[Boost-bugs] [Boost C++ Libraries] #1574: operator<< for boost::posix_time::ptime ignores ostream flags

Subject: [Boost-bugs] [Boost C++ Libraries] #1574: operator<< for boost::posix_time::ptime ignores ostream flags
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-01-16 17:15:54


#1574: operator<< for boost::posix_time::ptime ignores ostream flags
-----------------------------+----------------------------------------------
 Reporter: adam_at_[hidden] | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: | Component: date_time
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: |
-----------------------------+----------------------------------------------
 Consider the following:
 {{{
 boost::posix_time::ptime a;

 cout << "one " << 1 << endl;
 cout.clear(ios::failbit);
 cout << "two " << 2 << endl;
 cout << "time " << a << endl;
 cout << "three" << 3 << endl;
 cout.clear(ios::goodbit);
 cout << "four " << 4 << endl;
 }}}

 Since cout should not produce output when ios::failbit is set, one would
 expect the output to be:
 {{{
 one 1
 four 4
 }}}

 However, the output is:
 {{{
 one 1
 not-a-date-timefour 4
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1574>
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:49:57 UTC