std::ostream_iterator<T,CharT,Traits>::operator= (3) - Linux Manuals
std::ostream_iterator<T,CharT,Traits>::operator=: std::ostream_iterator<T,CharT,Traits>::operator=
NAME
std::ostream_iterator<T,CharT,Traits>::operator= - std::ostream_iterator<T,CharT,Traits>::operator=
Synopsis
ostream_iterator& operator=( const T& value );
Inserts value into the associated stream, then inserts the delimiter, if one was specified at construction time.
If out_stream is a pointer to the associated std::basic_ostream and delim is the delimiter specified at the construction of this object, then the effect is equivalent to
*out_stream << value;
if(delim != 0)
*out_stream << delim;
return *this;
Parameters
value - the object to insert
Return value
*this
Notes
T can be any class with a user-defined operator<<
Example
// Run this code
Output: