Files
cppdraft_translate/cppdraft/syncstream/syncbuf/virtuals.md
2025-10-25 03:02:53 +03:00

1.0 KiB

[syncstream.syncbuf.virtuals]

31 Input/output library [input.output]

31.11 Synchronized output streams [syncstream]

31.11.2 Class template basic_syncbuf [syncstream.syncbuf]

31.11.2.5 Overridden virtual functions [syncstream.syncbuf.virtuals]

🔗

int sync() override;

1

#

Effects: Records that the wrapped stream buffer is to be flushed.

Then, if emit-on-sync is true, calls emit().

[Note 1:

If emit-on-sync is false, the actual flush is delayed until a call to emit().

— end note]

2

#

Returns: If emit() was called and returned false, returns -1; otherwise 0.