std::emit_o...mit_on_flush(3)

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

okay so bestie, welcome to std::emit_o...mit_on_flush(3) from the C++ Standard Libary β€” yes, that's the manual name, spelling and all, and yes, the title is literally std::emit_o...mit_on_flush(3) πŸ’… This page is giving "two tiny manipulators who control flush behavior" and honestly? iconic.

✨ NAME ✨

std::emit_on_flush,std::noemit_on_flush β€” the original NAME line is literally std::emit_on_flush,std::noemit_on_flush - std::emit_on_flush,std::noemit_on_flush, so yeah, it says the same thing twice. We love a repetitive queen πŸ’…

🌸 Synopsis 🌸

Defined in header <ostream> πŸ¦‹

(1) (since C++20)

template< class CharT, class Traits >
std::basic_ostream<CharT, Traits>& emit_on_flush(
std::basic_ostream<CharT, Traits>& os );

(2) (since C++20)

template< class CharT, class Traits >
std::basic_ostream<CharT, Traits>& noemit_on_flush(
std::basic_ostream<CharT, Traits>& os );

If os.rdbuf() actually points to a std::basic_syncbuf<CharT, Traits, Allocator> buf, these manipulators toggle whether it emits β€” i.e., transmits data to the underlying stream buffer β€” when flushed:

  1. calls buf.set_emit_on_sync(true)
  2. calls buf.set_emit_on_sync(false)

Otherwise, these manipulators have no effect 😌 periodt.

This is an output-only I/O manipulator, it may be called with an expression such as out << std::emit_on_flush for any out of type std::basic_ostream.

πŸŽ€ Parameters πŸŽ€

  • os β€” reference to output stream.

πŸ’– Return value πŸ’–

  • Returns os (reference to the stream after manipulation) ✨

😭 Example 😭

This section is incomplete Reason: no example

πŸ”₯ See also πŸ”₯

  • set_emit_on_sync β€” public member function of std::basic_syncbuf<CharT,Traits,Allocator>; changes the current emit-on-sync policy πŸ‘‘

πŸŽ€ Category: πŸŽ€

  • Todo no example

That's the whole page, bestie! Big kiss from cppreference.com, dated 2024.06.10, for the std::emit_o...mit_on_flush(3) page πŸ’…βœ¨

πŸ“¦ where this page comes from