std::experimental::ostream_joiner (3) - Linux Man Pages
Defined in header <experimental/iterator>
template< class DelimT,
class CharT = char, (library fundamentals TS v2)
class Traits = std::char_traits<CharT>>
std::experimental::ostream_joiner is a single-pass LegacyOutputIterator that writes successive objects into the std::basic_ostream object for which it was constructed, using operator<<, separated by a delimiter. The delimiter is written to the output stream between every two objects that are written. The write operation is performed when the iterator (whether dereferenced or not) is assigned to. Incrementing the ostream_joiner is a no-op.
In a typical implementation, the only data members of ostream_joiner are a pointer to the associated std::basic_ostream, the delimiter, and a bool member that indicates whether the next write is for the first element in the sequence.
Compared to std::ostream_iterator, ostream_joiner prints the delimiter sequence one fewer time, and is not templated on the type of the object to be printed.
Member type Definition
ostream_type std::basic_ostream<CharT, Traits>
constructor (public member function)
destructor destructs an ostream_joiner
operator= (public member function)
operator* (public member function)
operator++ (public member function)
make_ostream_joiner (function template)
// Run this code
ostreambuf_iterator (class template)
ostream_iterator (class template)
istream_iterator (class template)