Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66348 - sandbox/chrono/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2010-11-01 20:56:36


Author: viboes
Date: 2010-11-01 20:56:33 EDT (Mon, 01 Nov 2010)
New Revision: 66348
URL: http://svn.boost.org/trac/boost/changeset/66348

Log:
Chrono: Remove Input part from chrono_io

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

Modified: sandbox/chrono/libs/chrono/example/io_ex2.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex2.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex2.cpp 2010-11-01 20:56:33 EDT (Mon, 01 Nov 2010)
@@ -21,6 +21,7 @@
     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;
@@ -32,7 +33,7 @@
     in >> d;
     assert(in.fail());
     assert(d == seconds(4));
-
+#endif
     return 0;
 }
 

Modified: sandbox/chrono/libs/chrono/example/io_ex3.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex3.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex3.cpp 2010-11-01 20:56:33 EDT (Mon, 01 Nov 2010)
@@ -26,9 +26,13 @@
     stringstream io;
     io << t0;
     high_resolution_clock::time_point t1;
+#ifdef BOOST_CHRONO_IO_INPUT
     io >> t1;
     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