std::experimental::ostream_joiner<DelimT,CharT,Traits>::operator=
Min standard notice:
- First, if the private “first element” flag is false, insert the delimiter delim into the output stream os associated with this iterator as if by os « delim;.
# Declarations
template< class T >
ostream_joiner& operator=( const T& value );
(library fundamentals TS v2)
ostream_joiner& operator=( const ostream_joiner& other ) = default;
(library fundamentals TS v2) (implicitly declared)
ostream_joiner& operator=( ostream_joiner&& other ) = default;
(library fundamentals TS v2) (implicitly declared)
# Parameters
value: the object to to be written to the streamother: the ostream_joiner object to be assigned to this object
# Return value
*this.
# Example
#include <experimental/iterator>
#include <iostream>
int main()
{
auto joiner = std::experimental::make_ostream_joiner(std::cout, ", ");
joiner = "First";
joiner = "do no harm."; // prefixes with the delimiter
}