[Boost-bugs] [Boost C++ Libraries] #6677: Example helper function for printing vectors should use passed std::ostream instead of std::cout

Subject: [Boost-bugs] [Boost C++ Libraries] #6677: Example helper function for printing vectors should use passed std::ostream instead of std::cout
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-12 06:06:53


#6677: Example helper function for printing vectors should use passed std::ostream
instead of std::cout
------------------------------------------------------+---------------------
 Reporter: Grigory Sokolov <greg.sokolov@…> | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.49.0 | Severity: Cosmetic
 Keywords: |
------------------------------------------------------+---------------------
 Affected files: example/multiple_sources.cpp,
 example/options_description.cpp

 template<class T>
 ostream& operator<<(ostream& os, const vector<T>& v)
 {
     copy(v.begin(), v.end(), ostream_iterator<T>(cout, " "));
     return os;
 }

 should be replaced with

 template<class T>
 ostream& operator<<(ostream& os, const vector<T>& v)
 {
     copy(v.begin(), v.end(), ostream_iterator<T>(os, " "));
     return os;
 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6677>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC