std::basic_filebuf<CharT,Traits>::basic_filebuf
From cppreference.com
< cpp | io | basic filebuf
C++
Input/output library
| I/O manipulators | ||||
| Print functions (C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
| Synchronized Output | ||||
(C++20) | ||||
| Types | ||||
| Error category interface | ||||
(C++11) | ||||
(C++11) |
std::basic_filebuf
| Public member functions | ||||
basic_filebuf::basic_filebuf | ||||
(C++11) | ||||
(C++11) | ||||
(C++26) | ||||
| Protected member functions | ||||
| Non-member functions | ||||
(C++11) |
| basic_filebuf(); |
(1) | |
| basic_filebuf( const std::basic_filebuf& rhs ) = delete; |
(2) | (since C++11) |
| basic_filebuf( std::basic_filebuf&& rhs ); |
(3) | (since C++11) |
Constructs new std::basic_filebuf object.
1) Constructs a
std::basic_filebuf object, initializing the base class by calling the default constructor of std::basic_streambuf. The created basic_filebuf is not associated with a file, and is_open() returns false.3) Move-constructs a
std::basic_filebuf object by moving all contents from another std::basic_filebuf object rhs, including the buffers, the associated file, the locale, the openmode, the is_open variable, and all other state. After move, rhs is not associated with a file and rhs.is_open() == false. The member pointers of the base class std::basic_streambuf of rhs and of the base class of *this are guaranteed to point to different buffers (unless null).Contents |
[edit] Parameters
| rhs | - | another basic_filebuf
|
[edit] Notes
Typically called by the constructor of std::basic_fstream.
[edit] Example
| This section is incomplete Reason: no example |
[edit] See also
| (C++11) |
assigns a basic_filebuf object (public member function) [edit] |
| [virtual] |
destructs a basic_filebuf object and closes the file if it is open (virtual public member function) [edit] |