1 /* 2 Copyright 2019 Glen Joseph Fernandes 3 (glenjofe@gmail.com) 4 5 Distributed under the Boost Software License, Version 1.0. 6 (http://www.boost.org/LICENSE_1_0.txt) 7 */ 8 #include <boost/io/ostream_joiner.hpp> 9 #include <boost/core/lightweight_test.hpp> 10 #include <sstream> 11 main()12int main() 13 { 14 std::ostringstream o; 15 boost::io::ostream_joiner<char> j = boost::io::make_ostream_joiner(o, ','); 16 *j++ = 1; 17 *j++ = '2'; 18 *j++ = "3"; 19 BOOST_TEST_EQ(o.str(), "1,2,3"); 20 return boost::report_errors(); 21 } 22