std::basic_...f::operator=(3)

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

okay so this is std::basic_...f::operator=(3) from the C++ Standard Libary manual β€” literally the move-assignment operator page for std::basic_syncbuf, and she is lowkey carrying the whole syncbuf situation. no cap. πŸ’…

✨ NAME ✨

std::basic_syncbuf::operator= β€” std::basic_syncbuf::operator=. that's the name, that's the vibe, that's the assignment operator we're talking about, bestie. 🫢

🌸 SYNOPSIS 🌸

basic_syncbuf& operator=( basic_syncbuf&& other );

First, it calls emit() to transmit all pending output (and delayed flush, if any) to the wrapped stream. ✨

Then it does move-assignment by moving all contents from other, including the temporary storage, the wrapped stream pointer, policy, and all other state (such as the mutex pointer). After the move, other is not associated with a stream, and other.get_wrapped() == nullptr β€” yes, fr fr. The put area member pointers of the base class std::basic_streambuf of other are guaranteed to be null. Destroying a moved-from other will not produce any output. πŸ’€

Now the allocator bit, because of course there's an allocator bit: if std::allocator_traits<Allocator>::propagate_on_container_move_assignment::value is false, then the allocator is unchanged. Otherwise, after move-assignment, get_allocator() equals other.get_allocator(). 🧚

πŸŽ€ PARAMETERS πŸŽ€

  • other β€” another std::basic_syncbuf to move from. that's the whole parameter list, and she ate. πŸ’–

πŸ’œ RETURN VALUE πŸ’œ

*this β€” she returns herself, main character energy, periodt. πŸ‘‘

😭 EXAMPLE 😭

This section is incomplete.

Reason: no example. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

  • operator= β€” assigns a basic_osyncstream object; public member function of std::basic_osyncstream<CharT,Traits,Allocator>.
  • constructor β€” constructs a basic_syncbuf object; public member function.
  • emit β€” atomically transmits the entire internal buffer to the wrapped streambuf; public member function.
  • swap β€” swaps two basic_syncbuf objects; public member function.

πŸ“ CATEGORY πŸ“

  • Todo no example

mwah πŸ’‹ β€” this page came from http://cppreference.com, dated 2024.06.10, and its title is std::basic_...f::operator=(3). now go move-assign something, bestie. πŸŽ€

πŸ“¦ where this page comes from