std::basic_...asic_filebuf(3)
π NAME
std::basic_filebuf::basic_filebuf β bestie, this is the constructor page for the C++ filebuf glow-up. It's the std::basic_...asic_filebuf(3) page from the C++ Standard Libary manual (yes, that spelling is in the house π).
β¨ Synopsis β¨
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. That's the whole vibe. Now the numbered lore:
(1)β Constructs astd::basic_filebufobject, initializing the base class by calling the default constructor ofstd::basic_streambuf. The createdbasic_filebufis not associated with a file, andis_open()returnsfalse. No file bestie, just vibes. π(2)(since C++11) β The copy constructor is deleted;std::basic_filebufis notCopyConstructible. It's giving "no copy-paste, only move" energy, periodt.(3)(since C++11) β Move-constructs astd::basic_filebufobject by moving all contents from anotherstd::basic_filebufobjectrhs, including the buffers, the associated file, the locale, the openmode, theis_openvariable, and all other state. After move,rhsis not associated with a file andrhs.is_open() == false. The member pointers of the base classstd::basic_streambufofrhsand of the base class of*thisare guaranteed to point to different buffers (unless null). Slay, separate buffers. β¨
πΈ Parameters
rhsβ anotherbasic_filebuf. that's the whole parameter. iconic minimalism. π
π¦ Notes
Typically called by the constructor of std::basic_fstream. so if you're wondering who invited this constructor to the party, it's usually basic_fstream. π
π Example
This section is incomplete. Reason: no example. bestie we have no example π the section itself is marked incomplete, and the reason is literally no example. no cap.
π See also
operator=β assigns abasic_filebufobject;(C++11);(public member function). π- destructor β destructs a
basic_filebufobject and closes the file if it is open;[virtual];(virtual public member function). closing time, but make it virtual. π
π Category
Todo no exampleβ yep, that's the category tag. the page is literally tagged todo/no example. π«
xoxo, your Unix bestie π source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::basic_...asic_filebuf(3). bye bestie, go construct some filebufs responsibly π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms