28 Input/output library [input.output]

28.10 Synchronized output streams [syncstream]

28.10.1 Header <syncstream> synopsis [syncstream.syn]

#include <ostream>  // see [ostream.syn]

namespace std {
  template<class charT, class traits, class Allocator>
    class basic_syncbuf;

  using syncbuf = basic_syncbuf<char>;
  using wsyncbuf = basic_syncbuf<wchar_t>;

  template<class charT, class traits, class Allocator>
    class basic_osyncstream;

  using osyncstream = basic_osyncstream<char>;
  using wosyncstream = basic_osyncstream<wchar_t>;
}
The header <syncstream> provides a mechanism to synchronize execution agents writing to the same stream.