std::basic_istream::sync

From Cppreference

Jump to: navigation, search
int sync();

Fills the input cache buffer with data from the underlying input device.

Contents

[edit] Parameters

(none)

[edit] Return value

If the stream is buffered and the function is successful, 0 is returned. If the stream is unbuffered, -1 is returned. In the case of error, setstate(badbit) is called and depending on exceptions bitmask, exception is thrown.

[edit] Example

[edit] See also

flush
synchronizes with the underlying storage device
(public member function of std::basic_ostream)