std::basic_...asic_filebuf(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ 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. (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. No file bestie, just vibes. πŸ’…
  2. (2) (since C++11) β€” The copy constructor is deleted; std::basic_filebuf is not CopyConstructible. It's giving "no copy-paste, only move" energy, periodt.
  3. (3) (since C++11) β€” 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). Slay, separate buffers. ✨

🌸 Parameters

  • rhs β€” another basic_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 a basic_filebuf object; (C++11); (public member function). πŸ’–
  • destructor β€” destructs a basic_filebuf object 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