std::basic_...f::operator=(3)
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β anotherstd::basic_syncbufto 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 abasic_osyncstreamobject; public member function ofstd::basic_osyncstream<CharT,Traits,Allocator>.constructorβ constructs abasic_syncbufobject; public member function.emitβ atomically transmits the entire internal buffer to the wrapped streambuf; public member function.swapβ swaps twobasic_syncbufobjects; 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
- 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