[#bsl-basic_istringstream-sync] = xref:bsl.adoc[bsl]::xref:bsl/basic_istringstream.adoc[basic_istringstream]::sync :relfileprefix: ../../ :mrdocs: Synchronizing the stream buffer. == Synopsis Declared in `<bslstl_istringstream.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [.small]#Created with https://www.mrdocs.com[MrDocs]#