Namespaces
Variants
Views
Actions

std::basic_streambuf::pubsync, std::basic_streambuf::sync

From cppreference.com
 
 
 
 
int pubsync();
(1)
protected:
virtual int sync();
(2)

Synchronizes the underlying device with the buffers.

1) Calls sync() of the most derived class

2) The base class version of this function has no effect. The derived classes may override this function to allow synchronizing the underlying device with the buffers.

[edit] Parameters

(none)

[edit] Return value

1) The return value of sync().

2) Returns 0 on success, -1 otherwise. The base class version returns 0.

[edit] Example