[syncstream.syn]

# 31 Input/output library [[input.output]](./#input.output)

## 31.11 Synchronized output streams [[syncstream]](syncstream#syn)

### 31.11.1 Header <syncstream> synopsis [syncstream.syn]

[ð](#header:%3csyncstream%3e)

#include <ostream> // see [[ostream.syn]](ostream.syn "31.7.2 Header <ostream> synopsis")namespace std {// [[syncstream.syncbuf]](syncstream.syncbuf "31.11.2 Class template basic_­syncbuf"), class template basic_syncbuftemplate<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>class basic_syncbuf; // [[syncstream.syncbuf.special]](syncstream.syncbuf.special "31.11.2.6 Specialized algorithms"), specialized algorithmstemplate<class charT, class traits, class Allocator>void swap(basic_syncbuf<charT, traits, Allocator>&,
 basic_syncbuf<charT, traits, Allocator>&); using syncbuf = basic_syncbuf<char>; using wsyncbuf = basic_syncbuf<wchar_t>; // [[syncstream.osyncstream]](syncstream.osyncstream "31.11.3 Class template basic_­osyncstream"), class template basic_osyncstreamtemplate<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>class basic_osyncstream; using osyncstream = basic_osyncstream<char>; using wosyncstream = basic_osyncstream<wchar_t>;}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L12596)

The header [<syncstream>](#header:%3csyncstream%3e "31.11.1 Header <syncstream> synopsis [syncstream.syn]") provides a mechanism
to synchronize execution agents writing to the same stream[.](#1.sentence-1)
