std::basic_...f::overflow(3)

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

πŸ’… NAME πŸ’…

std::basic_filebuf::overflow β€” std::basic_filebuf::overflow

okay so this is the std::basic_...f::overflow page from the C++ Standard Libary, and it’s giving protected-virtual-member-function realness. πŸ’– The NAME is literally std::basic_filebuf::overflow, repeated because that’s how the page does it. No cap.

✨ Synopsis ✨

protected:
virtual int_type overflow ( int_type c = Traits::eof() );

This one writes some data from the put area to the associated character sequence (to the file). 🫢

It behaves like the base class std::basic_streambuf::overflow, except that, to write the data, it first uses std::codecvt::out of the imbued locale to convert the characters into external (possibly multibyte) representation, stored in a temporary buffer (allocated as large as necessary), then uses file I/O to copy all fully-converted bytes into the file. Iconic codecvt-to-file pipeline behavior, honestly.

If std::codecvt::always_noconv is true, the call to std::codecvt::out may be skipped. πŸ‘‘

If the conversion fails with std::codecvt_base::error, it returns Traits::eof() without attempting any output. No output attempt, periodt.

If the associated file is not open (is_open() == false), it returns Traits::eof() before doing anything. πŸ›‘

🌸 Parameters 🌸

(none) β€” literally zero parameters, bestie.

πŸ¦‹ Return value πŸ¦‹

Traits::not_eof(c) to indicate success, or Traits::eof() to indicate failure. That’s the whole vibe check. ✨

πŸŽ€ Example πŸŽ€

This section is incomplete Reason: no example

πŸ”₯ See also πŸ”₯

  • overflow β€” writes characters to the associated output sequence from the put area [virtual] (virtual protected member function of std::basic_streambuf<CharT,Traits>)
  • underflow β€” reads from the associated file [virtual] (virtual protected member function)

⭐ Category ⭐

  • Todo no example

source: cppreference.com Β· version/date: 2024.06.10 Β· page: std::basic_...f::overflow(3) β€” mwah, bestie, that’s the whole manpage πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from