std::basic_syncbuf::sync(3)

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

πŸ’– 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 of std::basic_streambuf<CharT,Traits>). πŸ’œ
  • emit β€” calls emit() on the underlying basic_syncbuf to transmit its internal data to the final destination. (public member function of std::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