Boost C++ Libraries: Ticket #6677: Example helper function for printing vectors should use passed std::ostream instead of std::cout https://svn.boost.org/trac10/ticket/6677 <p> Affected files: example/multiple_sources.cpp, example/options_description.cpp </p> <p> template&lt;class T&gt; ostream&amp; operator&lt;&lt;(ostream&amp; os, const vector&lt;T&gt;&amp; v) { </p> <blockquote> <p> copy(v.begin(), v.end(), ostream_iterator&lt;T&gt;(cout, " ")); return os; </p> </blockquote> <p> } </p> <p> should be replaced with </p> <p> template&lt;class T&gt; ostream&amp; operator&lt;&lt;(ostream&amp; os, const vector&lt;T&gt;&amp; v) { </p> <blockquote> <p> copy(v.begin(), v.end(), ostream_iterator&lt;T&gt;(os, " ")); return os; </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6677 Trac 1.4.3 Vladimir Prus Sun, 08 Apr 2012 08:17:57 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6677#comment:1 https://svn.boost.org/trac10/ticket/6677#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/77826" title="Make vector print function in examples be more correct. Fixes #6677. ">[77826]</a>) Make vector print function in examples be more correct. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6677" title="#6677: Bugs: Example helper function for printing vectors should use passed ... (closed: fixed)">#6677</a>. </p> Ticket