30 Input/output library [input.output]

30.9 File-based streams [file.streams]

30.9.3 Class template basic_­ifstream [ifstream]

30.9.3.1 basic_­ifstream constructors [ifstream.cons]

basic_ifstream();
Effects: Constructs an object of class basic_­ifstream<charT, traits>, initializing the base class with basic_­istream(&sb) and initializing sb with basic_­filebuf<charT, traits>()) ([istream.cons], [filebuf.cons]).
explicit basic_ifstream(const char* s, ios_base::openmode mode = ios_base::in); explicit basic_ifstream(const filesystem::path::value_type* s, ios_base::openmode mode = ios_base::in); // wide systems only; see [fstream.syn]
Effects: Constructs an object of class basic_­ifstream, initializing the base class with basic_­istream(&sb) and initializing sb with basic_­filebuf<charT, traits>()) ([istream.cons], [filebuf.cons]), then calls rdbuf()->open(s, mode | ios_­base​::​in).
If that function returns a null pointer, calls setstate(failbit).
explicit basic_ifstream(const string& s, ios_base::openmode mode = ios_base::in); explicit basic_ifstream(const filesystem::path& s, ios_base::openmode mode = ios_base::in);
Effects: The same as basic_­ifstream(s.c_­str(), mode).
basic_ifstream(basic_ifstream&& rhs);
Effects: Move constructs from the rvalue rhs.
This is accomplished by move constructing the base class, and the contained basic_­filebuf.
Next basic_­istream<charT, traits>​::​set_­rdbuf(&sb) is called to install the contained basic_­filebuf.