std::basic_syncbuf::sync(3)
π std::basic_syncbuf::sync(3) π
okay bestie, we're in the C++ Standard Libary manual and this page is literally all about std::basic_syncbuf::sync. yes, that std::basic_syncbuf::sync. she's protected, she's an override, and she has a very specific little flush-job. π
β¨ NAME β¨
std::basic_syncbuf::sync β bestie, that's the name: std::basic_syncbuf::sync. we are looking at the sync member of std::basic_syncbuf, no cap. π
πΈ Synopsis πΈ
protected:
int sync() override;
First thing she does: records that a flush is pending, by updating the appropriate private flag. noted. π«Ά
Then, if the current emit-on-sync policy is true, she makes a call to emit().
Otherwise β if the emit-on-sync policy is false, which is the default, bestie β the flush is suspended until emit() is called, such as through std::basic_osyncstream::emit() or std::basic_osyncstream::~basic_osyncstream. periodt. π
π¦ Parameters π¦
(none)β literally none. no parameters. nothing to pass. iconic behavior, honestly. π
π Notes π
sync() or its equivalent is implicitly called by close(), seekoff(), and seekpos(), and explicitly called by std::basic_streambuf::pubsync(). iykyk. β¨
π Example π
This section is incomplete Reason: no example
π no example yet β this section is incomplete, and the reason is literally "no example". don't come for me, I'm just the messenger. π
π§ See also π§
syncβ synchronizes the buffers with the associated character sequence.[virtual](virtual protected member function ofstd::basic_streambuf<CharT,Traits>). πemitβ callsemit()on the underlyingbasic_syncbufto transmit its internal data to the final destination. (public member function ofstd::basic_osyncstream<CharT,Traits,Allocator>). π₯
π Category π
* Todo no exampleβ yes bestie, that's the category. π«
made with π from http://cppreference.com Β· source/version date: 2024.06.10 β mwah π
π¦ 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