P1293R1
Revision of P1293R0
2018-11-25
Mike Spertus, Symantec
mike_spertus@symantec.com
Nathan Wilson
nwilson20@gmail.com
Target: Library Evolution, Library
ostream_joiner j(cout, ", ");
produces a compile time error as the delimiter type is deduced as char const[3].
To fix this, add the following to the end of the class definition for ostream_joiner
template <class DelimT, class charT = char, class traits = char_traits<charT> >
class ostream_joiner;
template <class charT, class traits, class DelimT>
ostream_joiner<decay_t&t;DelimT>, charT, traits>
make_ostream_joiner(basic_ostream<charT, traits>& os, DelimT&& delimiter);
At the end of the definition of class ostream_joiner in iterator.ostream.joiner,
add the following.
};
template<class DelimT, class CharT, class Traits>
ostream_joiner(basic_ostream<CharT, Traits>, DelimT) -> ostream_joiner<DelimT, CharT, Traits>;
Remove the iterator.ostream.joiner.creation section
ostream_joiner creation function [iterator.ostream.joiner.creation]template <class charT, class traits, class DelimT> ostream_joiner<decay_t<DelimT>, charT, traits> make_ostream_joiner(basic_ostream<charT, traits>& os, DelimT&& delimiter);
Returns:ostream_joiner<decay_t<DelimT>, charT, traits>(os, forward<DelimT>(delimiter));