bsl::basic_istringstream::sync

Synchronizing the stream buffer.

Synopsis

Declared in <bslstl_istringstream.h>

int
sync();

Description

If rdbuf() is a null pointer, returns -1.

Otherwise, calls rdbuf()->pubsync(), and if that returns -1, sets badbit and returns -1.

Otherwise, returns 0.

NOTE

This function does not count the number of characters extracted, if any, and therefore does not affect the next call to gcount().

Return Value

0 on success, -1 on failure