Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68116 - trunk/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2011-01-13 13:18:50


Author: viboes
Date: 2011-01-13 13:18:49 EST (Thu, 13 Jan 2011)
New Revision: 68116
URL: http://svn.boost.org/trac/boost/changeset/68116

Log:
Boost.Chrono: Add debug info for io_ex3.cpp

Text files modified:
   trunk/libs/chrono/example/io_ex2.cpp | 2 --
   trunk/libs/chrono/example/io_ex3.cpp | 7 +++----
   2 files changed, 3 insertions(+), 6 deletions(-)

Modified: trunk/libs/chrono/example/io_ex2.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex2.cpp (original)
+++ trunk/libs/chrono/example/io_ex2.cpp 2011-01-13 13:18:49 EST (Thu, 13 Jan 2011)
@@ -21,7 +21,6 @@
     using namespace std;
     using namespace boost::chrono;
 
-#ifdef BOOST_CHRONO_IO_INPUT
     istringstream in("5000 milliseconds 4000 ms 3001 ms");
     seconds d(0);
     in >> d;
@@ -33,7 +32,6 @@
     in >> d;
     BOOST_ASSERT(in.fail());
     BOOST_ASSERT(d == seconds(4));
-#endif
     return 0;
 }
 

Modified: trunk/libs/chrono/example/io_ex3.cpp
==============================================================================
--- trunk/libs/chrono/example/io_ex3.cpp (original)
+++ trunk/libs/chrono/example/io_ex3.cpp 2011-01-13 13:18:49 EST (Thu, 13 Jan 2011)
@@ -25,14 +25,13 @@
     high_resolution_clock::time_point t0 = high_resolution_clock::now();
     stringstream io;
     io << t0;
+ BOOST_ASSERT(!io.fail());
+ cout << io.str() << '\n';
+ BOOST_ASSERT(!io.fail());
     high_resolution_clock::time_point t1;
-#ifdef BOOST_CHRONO_IO_INPUT
     io >> t1;
     BOOST_ASSERT(!io.fail());
     cout << io.str() << '\n';
-#else
- t1=t0;
-#endif
     cout << t0 << '\n';
     cout << t1 << '\n';
     high_resolution_clock::time_point t = high_resolution_clock::now();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk