Boost C++ Libraries: Ticket #560: bug in output the range to an ostream https://svn.boost.org/trac10/ticket/560 <pre class="wiki">followed code can't be compiled std::wstring ws(L"test"); boost::iterator_range&lt;std::wstring::const_iterator&gt; wrange(ws); std::wcout &lt;&lt; wrange; // compilation error here It seems the implementation of operator &lt;&lt; for iterator_range is not correct: File boost/iterator/iterator_range.hpp #ifndef BOOST_OLD_IOSTREAMS template&lt; typename IteratorT, typename Elem, typename Traits &gt; inline std::basic_ostream&lt;Elem,Traits&gt;&amp; operator&lt;&lt;( std::basic_ostream&lt;Elem, Traits&gt;&amp; Os, const iterator_range&lt;IteratorT&gt;&amp; r ) { std::copy( r.begin(), r.end(), std::ostream_iterator&lt;Elem&gt;(Os)); return Os; } .. I guess the function body should be like this: { typedef typename iterator_value&lt;IteratorT&gt;::type ValueType; std::copy( r.begin(), r.end(), std::ostream_iterator&lt;ValueType, Elem, Traits&gt;(Os)); return Os; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/560 Trac 1.4.3 nobody Mon, 13 Feb 2006 21:25:00 GMT <link>https://svn.boost.org/trac10/ticket/560#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/560#comment:1</guid> <description> <pre class="wiki">Logged In: NO fixed </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>sf-robot</dc:creator> <pubDate>Tue, 28 Feb 2006 03:20:36 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/560#comment:2 https://svn.boost.org/trac10/ticket/560#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). </pre> Ticket