Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68673 - sandbox/chrono/boost/stopwatches
From: vicente.botet_at_[hidden]
Date: 2011-02-06 12:07:01


Author: viboes
Date: 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
New Revision: 68673
URL: http://svn.boost.org/trac/boost/changeset/68673

Log:
Stopwatches: Adapt to changes of Chrono in trunk
Text files modified:
   sandbox/chrono/boost/stopwatches/lightweight_stopwatch.hpp | 80 ++++++++++++++++++++--------------
   sandbox/chrono/boost/stopwatches/scoped_stopclock.hpp | 24 ++++------
   sandbox/chrono/boost/stopwatches/scoped_suspend.hpp | 2
   sandbox/chrono/boost/stopwatches/scoped_suspend2.hpp | 2
   sandbox/chrono/boost/stopwatches/stopclock.hpp | 72 ++++++++++++++----------------
   sandbox/chrono/boost/stopwatches/stopclock_accumulator.hpp | 72 ++++++++++++++----------------
   sandbox/chrono/boost/stopwatches/stopwatch.hpp | 13 ++---
   sandbox/chrono/boost/stopwatches/stopwatch_accumulator.hpp | 8 --
   sandbox/chrono/boost/stopwatches/stopwatch_accumulator_formatter.hpp | 15 ++---
   sandbox/chrono/boost/stopwatches/stopwatch_accumulator_time_formatter.hpp | 25 ++++++----
   sandbox/chrono/boost/stopwatches/stopwatch_formatter.hpp | 4 -
   sandbox/chrono/boost/stopwatches/stopwatch_reporter.hpp | 92 +++++++++++++++++++++------------------
   sandbox/chrono/boost/stopwatches/stopwatch_scoped.hpp | 16 ++----
   sandbox/chrono/boost/stopwatches/suspendible_clock.hpp | 44 ++++++++++--------
   sandbox/chrono/boost/stopwatches/t24_hours.hpp | 2
   sandbox/chrono/boost/stopwatches/t24_hours_formatter.hpp | 10 +---
   sandbox/chrono/boost/stopwatches/time_formatter.hpp | 12 +---
   17 files changed, 240 insertions(+), 253 deletions(-)

Modified: sandbox/chrono/boost/stopwatches/lightweight_stopwatch.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/lightweight_stopwatch.hpp (original)
+++ sandbox/chrono/boost/stopwatches/lightweight_stopwatch.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -22,8 +22,6 @@
 #include <boost/accumulators/statistics/max.hpp>
 #include <boost/accumulators/statistics/mean.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost
 {
   namespace stopwatches
@@ -82,7 +80,7 @@
         typedef typename Clock::rep rep;
         typedef typename Clock::period period;
 
- explicit lightweight_stopwatch( storage_type& acc, system::error_code & ec = system::throws )
+ explicit lightweight_stopwatch( storage_type& acc, system::error_code & ec = BOOST_CHRONO_THROWS )
         : running_(false), suspended_(false),
           start_(duration::zero()), level_(0), partial_(duration::zero()), suspend_level_(0)
           , storage_(&acc), construction_(clock::now( ))
@@ -104,26 +102,32 @@
 
         
 //--------------------------------------------------------------------------------------//
- std::pair<duration, time_point> restart( system::error_code & ec = system::throws )
+ std::pair<duration, time_point> restart( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
- time_point tmp=clock::now( ec );
- if (ec) return time_point();
- if (running_&&(level_==1)) {
- partial_ += tmp - start_;
- traits::set_duration(get_storage(),partial_);
- partial_=duration::zero();
- } else {
- running_=true;
- }
- start_=tmp;
- return std::make_pair(traits::get_duration(get_storage()),start_);
+ time_point tmp=clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
+ if (running_&&(level_==1)) {
+ partial_ += tmp - start_;
+ traits::set_duration(get_storage(),partial_);
+ partial_=duration::zero();
+ } else {
+ running_=true;
+ }
+ start_=tmp;
+ return std::make_pair(traits::get_duration(get_storage()),start_);
         }
 
- time_point start( system::error_code & ec = system::throws )
+ time_point start( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             if (!running_) {
                 time_point tmp = clock::now( ec );
- if (ec) return time_point();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) {
+ return time_point();
+ }
+ }
                 start_ = tmp;
                 ++level_;
                 running_ = true;
@@ -135,11 +139,13 @@
             }
         }
 
- duration stop( system::error_code & ec = system::throws )
+ duration stop( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             if (running_ && (--level_==0)) {
                 time_point tmp=clock::now( ec );
- if (ec) return duration::zero();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
                 partial_ += tmp - start_;
                 traits::set_duration(get_storage(),partial_);
                 partial_=duration::zero();
@@ -151,12 +157,14 @@
             }
         }
 
- duration suspend( system::error_code & ec = system::throws )
+ duration suspend( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             if (running_) {
                 if (!suspended_) {
                     time_point tmp=clock::now( ec );
- if (ec) return duration::zero();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
                     ++suspend_level_;
                     partial_ += tmp - start_;
                     suspended_=true;
@@ -172,11 +180,13 @@
             }
         }
 
- time_point resume( system::error_code & ec = system::throws )
+ time_point resume( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             if (suspended_&&(--suspend_level_==0)) {
                 time_point tmp = clock::now( ec );
- if (ec) return time_point();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
                 start_ = tmp;
                 suspended_=false;
                 return start_;
@@ -186,14 +196,16 @@
             }
         }
 
- duration elapsed( system::error_code & ec = system::throws )
+ duration elapsed( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             if (running_) {
                 if (suspended_)
                     return traits::get_duration(get_storage());
                 else {
                     time_point tmp = clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
                     if (ec) return duration::zero();
+ }
                     return traits::get_duration(get_storage())+tmp - start_;
                 }
             } else {
@@ -201,15 +213,17 @@
             }
         }
 
- time_point now( system::error_code & ec = system::throws )
+ time_point now( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             return time_point(elapsed( ec ));
         }
 
- void reset( system::error_code & ec = system::throws )
+ void reset( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             construction_=clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
             if (ec) return;
+ }
             traits::reset(get_storage());
             running_=false;
             suspended_=false;
@@ -224,7 +238,7 @@
             return *storage_;
         }
 
- duration lifetime( system::error_code & ec = system::throws )
+ duration lifetime( system::error_code & ec = BOOST_CHRONO_THROWS )
         {
             return clock::now( ec ) - construction_;
         }
@@ -253,16 +267,16 @@
                         accumulators::tag::mean
> default_features;
     typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::system_clock > system_lightweight_stopwatch;
-#ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::monotonic_clock > monotonic_lightweight_stopwatch;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::steady_clock > steady_lightweight_stopwatch;
 #endif
     typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::high_resolution_clock > high_resolution_lightweight_stopwatch;
 
     typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::system_clock,
         lightweight_stopwatch_accumulator_set_traits<default_features> > system_lightweight_stopwatch_accumulator;
-#ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::monotonic_clock,
- lightweight_stopwatch_accumulator_set_traits<default_features> > monotonic_lightweight_stopwatch_accumulator;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::steady_clock,
+ lightweight_stopwatch_accumulator_set_traits<default_features> > steady_lightweight_stopwatch_accumulator;
 #endif
     typedef boost::stopwatches::lightweight_stopwatch< boost::chrono::high_resolution_clock,
         lightweight_stopwatch_accumulator_set_traits<default_features> > high_resolution_lightweight_stopwatch_accumulator;
@@ -273,6 +287,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/scoped_stopclock.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/scoped_stopclock.hpp (original)
+++ sandbox/chrono/boost/stopwatches/scoped_stopclock.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -16,8 +16,6 @@
 #include <boost/stopwatches/time_formatter.hpp>
 #include <boost/stopwatches/stopwatch_accumulator_time_formatter.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost { namespace stopwatches {
 
 //--------------------------------------------------------------------------------------//
@@ -52,51 +50,51 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit scoped_stopclock( const string_type& func, system::error_code & ec = system::throws )
+ explicit scoped_stopclock( const string_type& func, system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec), func_(func)
         { begin(); }
         scoped_stopclock( const string_type& func, ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec), func_(func)
         { begin(); }
 
         scoped_stopclock( const string_type& func, ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec), func_(func)
         { begin(); }
 
@@ -117,6 +115,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif // BOOST_STOPWATCHES_STOPCLOCK_HPP

Modified: sandbox/chrono/boost/stopwatches/scoped_suspend.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/scoped_suspend.hpp (original)
+++ sandbox/chrono/boost/stopwatches/scoped_suspend.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -22,7 +22,7 @@
     template <class Clock>
     class scoped_suspend {
     public:
- scoped_suspend(system::error_code & ec = system::throws) {
+ scoped_suspend(system::error_code & ec = BOOST_CHRONO_THROWS) {
             ec.clear();
         }
         ~scoped_suspend() {}

Modified: sandbox/chrono/boost/stopwatches/scoped_suspend2.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/scoped_suspend2.hpp (original)
+++ sandbox/chrono/boost/stopwatches/scoped_suspend2.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -22,7 +22,7 @@
     template <class Clock>
     class scoped_suspend {
     public:
- scoped_suspend(system::error_code & ec = system::throws) {
+ scoped_suspend(system::error_code & ec = BOOST_CHRONO_THROWS) {
             ec.clear();
         }
         ~scoped_suspend() {}

Modified: sandbox/chrono/boost/stopwatches/stopclock.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopclock.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopclock.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -20,8 +20,6 @@
 #include <boost/chrono/process_cpu_clocks.hpp>
 #include <boost/type_traits/is_same.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost { namespace stopwatches {
 
 //--------------------------------------------------------------------------------------//
@@ -86,42 +84,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit basic_stopclock( system::error_code & ec = system::throws )
+ explicit basic_stopclock( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit basic_stopclock( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit basic_stopclock( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit basic_stopclock( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         basic_stopclock( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         basic_stopclock( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         basic_stopclock( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         basic_stopclock( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         basic_stopclock( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         basic_stopclock( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
         typedef stopwatch_runner<basic_stopclock> scoped_run;
@@ -155,42 +153,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit stopclock( system::error_code & ec = system::throws )
+ explicit stopclock( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit stopclock( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit stopclock( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit stopclock( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         stopclock( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         stopclock( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         stopclock( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         stopclock( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         stopclock( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         stopclock( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
         typedef stopwatch_runner<stopclock> scoped_run;
@@ -201,8 +199,8 @@
     };
 
     typedef stopclock< boost::chrono::system_clock > system_stopclock;
- #ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef stopclock< boost::chrono::monotonic_clock > monotonic_stopclock;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef stopclock< boost::chrono::steady_clock > steady_stopclock;
     #endif
     typedef stopclock< boost::chrono::high_resolution_clock > high_resolution_stopclock;
     typedef stopclock< boost::chrono::process_real_cpu_clock > process_real_cpu_stopclock;
@@ -229,42 +227,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit wstopclock( system::error_code & ec = system::throws )
+ explicit wstopclock( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit wstopclock( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit wstopclock( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit wstopclock( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         wstopclock( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         wstopclock( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         wstopclock( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         wstopclock( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         wstopclock( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         wstopclock( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
         typedef stopwatch_runner<wstopclock> scoped_run;
@@ -275,8 +273,8 @@
     };
 
     typedef wstopclock< boost::chrono::system_clock > system_wstopclock;
- #ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef wstopclock< boost::chrono::monotonic_clock > monotonic_wstopclock;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef wstopclock< boost::chrono::steady_clock > steady_wstopclock;
     #endif
     typedef wstopclock< boost::chrono::high_resolution_clock > high_resolution_wstopclock;
     typedef wstopclock< boost::chrono::process_real_cpu_clock > process_real_cpu_wstopclock;
@@ -288,6 +286,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif // BOOST_STOPWATCHES_STOPCLOCK_HPP

Modified: sandbox/chrono/boost/stopwatches/stopclock_accumulator.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopclock_accumulator.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopclock_accumulator.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -22,8 +22,6 @@
 #include <boost/chrono/process_cpu_clocks.hpp>
 #include <boost/type_traits/is_same.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost { namespace stopwatches {
 
 //--------------------------------------------------------------------------------------//
@@ -88,42 +86,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit basic_stopclock_accumulator( system::error_code & ec = system::throws )
+ explicit basic_stopclock_accumulator( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit basic_stopclock_accumulator( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit basic_stopclock_accumulator( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit basic_stopclock_accumulator( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         basic_stopclock_accumulator( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         basic_stopclock_accumulator( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         basic_stopclock_accumulator( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         basic_stopclock_accumulator( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         basic_stopclock_accumulator( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         basic_stopclock_accumulator( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
 
@@ -157,42 +155,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit stopclock_accumulator( system::error_code & ec = system::throws )
+ explicit stopclock_accumulator( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit stopclock_accumulator( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit stopclock_accumulator( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit stopclock_accumulator( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         stopclock_accumulator( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         stopclock_accumulator( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         stopclock_accumulator( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         stopclock_accumulator( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         stopclock_accumulator( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         stopclock_accumulator( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
 
@@ -203,8 +201,8 @@
     };
 
     typedef stopclock_accumulator< boost::chrono::system_clock > system_stopclock_accumulator;
- #ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef stopclock_accumulator< boost::chrono::monotonic_clock > monotonic_stopclock_accumulator;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef stopclock_accumulator< boost::chrono::steady_clock > steady_stopclock_accumulator;
     #endif
     typedef stopclock_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopclock_accumulator;
     typedef stopclock_accumulator< boost::chrono::process_real_cpu_clock > process_real_cpu_stopclock_accumulator;
@@ -231,42 +229,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit wstopclock_accumulator( system::error_code & ec = system::throws )
+ explicit wstopclock_accumulator( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit wstopclock_accumulator( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit wstopclock_accumulator( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit wstopclock_accumulator( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         wstopclock_accumulator( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         wstopclock_accumulator( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         wstopclock_accumulator( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         wstopclock_accumulator( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         wstopclock_accumulator( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         wstopclock_accumulator( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
 
@@ -277,8 +275,8 @@
     };
 
     typedef wstopclock_accumulator< boost::chrono::system_clock > system_wstopclock_accumulator;
- #ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef wstopclock_accumulator< boost::chrono::monotonic_clock > monotonic_wstopclock_accumulator;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef wstopclock_accumulator< boost::chrono::steady_clock > steady_wstopclock_accumulator;
     #endif
     typedef wstopclock_accumulator< boost::chrono::high_resolution_clock > high_resolution_wstopclock_accumulator;
     typedef wstopclock_accumulator< boost::chrono::process_real_cpu_clock > process_real_cpu_wstopclock_accumulator;
@@ -290,6 +288,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif // BOOST_STOPWATCHES_STOPCLOCK_HPP

Modified: sandbox/chrono/boost/stopwatches/stopwatch.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -17,8 +17,6 @@
 #include <boost/system/error_code.hpp>
 #include <boost/utility/base_from_member.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost
 {
   namespace stopwatches
@@ -36,7 +34,8 @@
 //~ The elapsed time since the last start is available through the elapsed function.
 //--------------------------------------------------------------------------------------//
 
- template <class Clock=chrono::high_resolution_clock>
+ //~ template <class Clock=chrono::high_resolution_clock>
+ template <class Clock=chrono::system_clock>
     class stopwatch;
 
     //~ struct dont_start_t{};
@@ -48,7 +47,7 @@
     {
     public:
         typedef base_from_member<typename Clock::duration> pbase_type;
- explicit stopwatch( system::error_code & ec = system::throws )
+ explicit stopwatch( system::error_code & ec = BOOST_CHRONO_THROWS )
         : pbase_type(), lightweight_stopwatch<Clock>(pbase_type::member, ec)
         {
         }
@@ -61,8 +60,8 @@
 
 //--------------------------------------------------------------------------------------//
     typedef boost::stopwatches::stopwatch< boost::chrono::system_clock > system_stopwatch;
-#ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef boost::stopwatches::stopwatch< boost::chrono::monotonic_clock > monotonic_stopwatch;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::stopwatches::stopwatch< boost::chrono::steady_clock > steady_stopwatch;
 #endif
     typedef boost::stopwatches::stopwatch< boost::chrono::high_resolution_clock > high_resolution_stopwatch;
 
@@ -71,6 +70,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/stopwatch_accumulator.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch_accumulator.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch_accumulator.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -18,8 +18,6 @@
 #include <boost/stopwatches/lightweight_stopwatch.hpp>
 #include <boost/utility/base_from_member.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost
 {
   namespace stopwatches
@@ -71,8 +69,8 @@
 
 //--------------------------------------------------------------------------------------//
     typedef boost::stopwatches::stopwatch_accumulator< boost::chrono::system_clock > system_stopwatch_accumulator;
-#ifdef BOOST_STOPWATCHES_HAS_CLOCK_MONOTONIC
- typedef boost::stopwatches::stopwatch_accumulator< boost::chrono::monotonic_clock > monotonic_stopwatch_accumulator;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::stopwatches::stopwatch_accumulator< boost::chrono::steady_clock > steady_stopwatch_accumulator;
 #endif
     typedef boost::stopwatches::stopwatch_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopwatch_accumulator;
 
@@ -82,6 +80,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/stopwatch_accumulator_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch_accumulator_formatter.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch_accumulator_formatter.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -29,8 +29,6 @@
 #include <cstring>
 #include <cassert>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 #define BOOST_STOPWATCHES_ACCUMULATOR_FORMAT_DEFAULT "%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p%\n"
 
 
@@ -65,14 +63,16 @@
         // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
         // be as low as 10, although will be 15 for many common platforms.
         {
- if (&ec==&system::throws) ec.clear();
-
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ ec.clear();
+ }
             typedef typename Stopwatch::storage_type accumulator;
             typedef typename Stopwatch::duration duration_t;
             accumulator& acc = stopwatch_.get_storage();
             duration_t lt= stopwatch_.lifetime(ec);
- if (ec) return;
-
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
             //if ( d < duration_t::zero() ) return;
             if ( places > 9 )
                 places = 9; // sanity check
@@ -166,7 +166,4 @@
 #define BOOST_STOPWATCHES_ACCUMULATOR_FUNCTION_FORMAT BOOST_STOPWATCHES_ACCUMULATOR_FORMAT(BOOST_CURRENT_FUNCTION)
 #endif
 
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/stopwatch_accumulator_time_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch_accumulator_time_formatter.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch_accumulator_time_formatter.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -30,8 +30,6 @@
 #include <cassert>
 #include <boost/stopwatches/time_formatter.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 //~ #define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT_DEFAULT "%c times, sum=%s, min=%m, max=%M, mean=%a, frequency=%fHz, lifetime=%ls, percentage=%p%|real %rs, cpu %cs (%p%), user %us, system %ss\n"
 #define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT_DEFAULT "%c times, sum %s, min %m, max %M, mean=%a, frequency=%fHz, lifetime=%ls, percentage=%p%\n"
 
@@ -67,8 +65,8 @@
         // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
         // be as low as 10, although will be 15 for many common platforms.
         {
- if (&ec==&system::throws) ec.clear();
-
+ if (!BOOST_CHRONO_IS_THROWS(ec))
+ ec.clear();
             typedef typename Stopwatch::storage_type accumulator;
             typedef typename Stopwatch::duration duration_t;
             accumulator& acc = stopwatch_.get_storage();
@@ -99,19 +97,25 @@
                     case 's':
                         //~ os << boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count();
                         time_formatter::show_time<chrono::process_cpu_clock>(accumulators::sum(acc), format2, places, os, ec);
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
                         //~ os << accumulators::sum(acc);
                         break;
                     case 'm':
                         //~ os << boost::chrono::duration<double>(duration_t((accumulators::min)(acc))).count();
                         time_formatter::show_time<chrono::process_cpu_clock>((accumulators::min)(acc), format2, places, os, ec);
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
                         //~ os << (accumulators::min)(acc);
                         break;
                     case 'M':
                         //~ os << boost::chrono::duration<double>(duration_t((accumulators::max)(acc))).count();
                         time_formatter::show_time<chrono::process_cpu_clock>((accumulators::max)(acc), format2, places, os, ec);
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
                         //~ os << (accumulators::max)(acc);
                         break;
                     case 'a':
@@ -119,7 +123,9 @@
                          //? os << boost::chrono::duration<double>(duration_t(typename duration_t::rep(accumulators::mean(acc)))).count()
                                 //~ os << boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count() / accumulators::count(acc)
                             time_formatter::show_time<chrono::process_cpu_clock>(accumulators::sum(acc) / accumulators::count(acc), format2, places, os, ec);
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
                         } else {
                             os << 0;
                         }
@@ -192,7 +198,4 @@
 #define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FUNCTION_FORMAT BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT(BOOST_CURRENT_FUNCTION)
 #endif
 
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/stopwatch_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch_formatter.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch_formatter.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -22,8 +22,6 @@
 #include <cstring>
 #include <cassert>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 #define BOOST_STOPWATCHES_STOPWATCH_FORMAT_DEFAULT "%ds\n"
 
 namespace boost { namespace stopwatches {
@@ -131,6 +129,4 @@
 #define BOOST_STOPWATCHES_STOPWATCH_FUNCTION_FORMAT BOOST_STOPWATCHES_STOPWATCH_FORMAT(BOOST_CURRENT_FUNCTION)
 #endif
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/stopwatch_reporter.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch_reporter.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch_reporter.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -85,62 +85,64 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit basic_stopwatch_reporter( system::error_code & ec = system::throws )
- : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ basic_stopwatch_reporter( )
+ : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
+ }
+ explicit basic_stopwatch_reporter( system::error_code & ec )
+ : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
         }
         explicit basic_stopwatch_reporter( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(Formatter::default_places()), m_os(os), m_format(Formatter::default_format()), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         explicit basic_stopwatch_reporter( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(format), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         explicit basic_stopwatch_reporter( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(places), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         basic_stopwatch_reporter( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(Formatter::default_places()), m_os(os), m_format(format), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         basic_stopwatch_reporter( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(places), m_os(Formatter::default_os()), m_format(format), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         basic_stopwatch_reporter( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(places), m_os(os), m_format(Formatter::default_format()), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         basic_stopwatch_reporter( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(places), m_os(Formatter::default_os()), m_format(format), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         basic_stopwatch_reporter( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(places), m_os(os), m_format(format), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         basic_stopwatch_reporter( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : m_places(places), m_os(os), m_format(format), m_reported(false) {
- if (&ec==&system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
         }
 
         ~basic_stopwatch_reporter() {// never throws
@@ -152,7 +154,7 @@
         }
 
 
- inline void report( system::error_code & /*ec*/ = system::throws );
+ inline void report( system::error_code & /*ec*/ = BOOST_CHRONO_THROWS );
         bool reported() const { return m_reported; }
 
 
@@ -176,7 +178,9 @@
     template <class Stopwatch, class Formatter>
     void basic_stopwatch_reporter<Stopwatch, Formatter>::report( system::error_code & ec ) {
         stopwatches::scoped_suspend<typename Stopwatch::clock> _(ec);
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
         if ( m_format.empty() ) m_format = Formatter::default_format();
 
         m_reported = true;
@@ -207,42 +211,44 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit stopwatch_reporter( system::error_code & ec = system::throws )
+ stopwatch_reporter( )
+ : base_type() { }
+ explicit stopwatch_reporter( system::error_code & ec )
         : base_type(ec) { }
         explicit stopwatch_reporter( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit stopwatch_reporter( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit stopwatch_reporter( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         stopwatch_reporter( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         stopwatch_reporter( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         stopwatch_reporter( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         stopwatch_reporter( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         stopwatch_reporter( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         stopwatch_reporter( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
         typedef stopwatch_runner<stopwatch_reporter<Stopwatch,Formatter> > scoped_run;
@@ -282,42 +288,42 @@
         typedef typename Formatter::char_type char_type;
         typedef typename Formatter::ostream_type ostream_type;
 
- explicit wstopwatch_reporter( system::error_code & ec = system::throws )
+ explicit wstopwatch_reporter( system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(ec) { }
         explicit wstopwatch_reporter( ostream_type & os,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, ec) { }
 
         explicit wstopwatch_reporter( const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, ec) { }
 
         explicit wstopwatch_reporter( int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, ec) { }
 
         wstopwatch_reporter( ostream_type & os, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, ec) { }
 
         wstopwatch_reporter( const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(format, places, ec) { }
 
         wstopwatch_reporter( ostream_type & os, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, ec) { }
 
         wstopwatch_reporter( int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(places, format, ec) { }
 
         wstopwatch_reporter( ostream_type & os, const string_type & format, int places,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, format, places, ec) { }
 
         wstopwatch_reporter( ostream_type & os, int places, const string_type & format,
- system::error_code & ec = system::throws )
+ system::error_code & ec = BOOST_CHRONO_THROWS )
         : base_type(os, places, format, ec) { }
 
         typedef stopwatch_runner<wstopwatch_reporter<Stopwatch,Formatter> > scoped_run;

Modified: sandbox/chrono/boost/stopwatches/stopwatch_scoped.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/stopwatch_scoped.hpp (original)
+++ sandbox/chrono/boost/stopwatches/stopwatch_scoped.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -13,8 +13,6 @@
 #include <boost/chrono/chrono.hpp>
 #include <boost/system/error_code.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost
 {
   namespace stopwatches
@@ -24,7 +22,7 @@
     template <class Stopwatch> class stopwatch_runner {
     public:
         typedef Stopwatch stopwatch;
- stopwatch_runner(stopwatch & a, system::error_code & ec = system::throws)
+ stopwatch_runner(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
         : stopwatch_(a) {
             stopwatch_.start(ec);
         }
@@ -33,7 +31,7 @@
             stopwatch_.stop(ec);
         }
 #if 0
- typename Stopwatch::duration elapsed(system::error_code & ec = system::throws)
+ typename Stopwatch::duration elapsed(system::error_code & ec = BOOST_CHRONO_THROWS)
         {
             return stopwatch_.elapsed(ec)-stopwatch_.get_storage();
         }
@@ -50,7 +48,7 @@
     template <class Stopwatch> class stopwatch_stopper {
     public:
         typedef Stopwatch stopwatch;
- stopwatch_stopper(stopwatch & a, system::error_code & ec = system::throws)
+ stopwatch_stopper(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
         : stopwatch_(a) {
             stopwatch_.stop(ec);
         }
@@ -59,7 +57,7 @@
             stopwatch_.start(ec);
         }
 #if 0
- typename Stopwatch::duration elapsed(system::error_code & ec = system::throws)
+ typename Stopwatch::duration elapsed(system::error_code & ec = BOOST_CHRONO_THROWS)
         {
             return stopwatch_.elapsed(ec)-stopwatch_.get_storage();
         }
@@ -76,7 +74,7 @@
     template <class Stopwatch> class stopwatch_suspender {
     public:
         typedef Stopwatch stopwatch;
- stopwatch_suspender(stopwatch & a, system::error_code & ec = system::throws)
+ stopwatch_suspender(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
         : stopwatch_(a) {
             stopwatch_.suspend(ec);
         }
@@ -95,7 +93,7 @@
     template <class Stopwatch> class stopwatch_resumer {
     public:
         typedef Stopwatch stopwatch;
- stopwatch_resumer(stopwatch & a, system::error_code & ec = system::throws)
+ stopwatch_resumer(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
         : stopwatch_(a) {
             stopwatch_.resume(ec);
         }
@@ -114,6 +112,4 @@
   } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif

Modified: sandbox/chrono/boost/stopwatches/suspendible_clock.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/suspendible_clock.hpp (original)
+++ sandbox/chrono/boost/stopwatches/suspendible_clock.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -17,8 +17,6 @@
 #include <boost/thread/tss.hpp>
 #include <memory>
 
-//~ #include <boost/config/abi_prefix.hpp> // must be the last #include
-
 namespace boost { namespace stopwatches {
 
     template < class Clock=chrono::high_resolution_clock >
@@ -28,7 +26,7 @@
         typedef typename Clock::rep rep;
         typedef typename Clock::period period;
         typedef chrono::time_point<suspendible_clock<Clock> > time_point;
- static const bool is_monotonic = true;
+ static const bool is_steady = true;
 
     private:
         struct thread_specific_context {
@@ -43,23 +41,27 @@
                 , suspended_duration_(duration::zero())
                 , suspend_level_(0)
             {}
- duration suspended(system::error_code & ec = system::throws) {
+ duration suspended(system::error_code & ec = BOOST_CHRONO_THROWS) {
                 if (!suspended_) {
                     ec.clear();
                     return suspended_duration_;
                 } else {
                     time_point tmp;
                     tmp+=duration(Clock::now(ec).time_since_epoch());
- if (ec) return duration::zero();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
                     return suspended_duration_ + tmp - suspended_time_;
                 }
             }
 
- void suspend( system::error_code & ec = system::throws ) {
+ void suspend( system::error_code & ec = BOOST_CHRONO_THROWS ) {
                 if (!suspended_) {
                     time_point tmp;
                     tmp+=duration(Clock::now(ec).time_since_epoch());
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
                     ++suspend_level_;
                     suspended_time_ = tmp;
                     suspended_=true;
@@ -68,11 +70,13 @@
                     ++suspend_level_;
                 }
             }
- void resume( system::error_code & ec = system::throws ) {
+ void resume( system::error_code & ec = BOOST_CHRONO_THROWS ) {
                 if (suspended_&&(--suspend_level_==0)) {
                     time_point tmp;
                     tmp+=duration(Clock::now(ec).time_since_epoch());
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
                     suspended_duration_ += tmp - suspended_time_;
                     suspended_=false;
                 } else {
@@ -84,7 +88,7 @@
         static thread_specific_context* instance(system::error_code & ec) {
             thread_specific_context* ptr= ptr_.get();
             if (ptr==0) {
- if (&ec == &system::throws) {
+ if (BOOST_CHRONO_IS_THROWS(ec)) {
                     std::auto_ptr<thread_specific_context> ptr2(new thread_specific_context());
                     ptr_.reset(ptr2.get());
                     ptr = ptr2.release();
@@ -125,21 +129,25 @@
         static time_point now( system::error_code & ec ) {
             time_point res;
             typename Clock::time_point t=Clock::now(ec);
- if (ec) return time_point();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
             res+= duration(t.time_since_epoch())-suspended(ec);
- if (ec) return time_point();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
             return res;
         }
 
- static void suspend( system::error_code & ec = system::throws ) {
+ static void suspend( system::error_code & ec = BOOST_CHRONO_THROWS ) {
             thread_specific_context* ptr= instance(ec);
             if (ptr!=0) ptr->suspend(ec);
         }
- static void resume( system::error_code & ec = system::throws ) {
+ static void resume( system::error_code & ec = BOOST_CHRONO_THROWS ) {
             thread_specific_context* ptr= instance(ec);
             if (ptr!=0) ptr->resume(ec);
         }
- static duration suspended(system::error_code & ec = system::throws)
+ static duration suspended(system::error_code & ec = BOOST_CHRONO_THROWS)
         {
             thread_specific_context* ptr= instance(ec);
             if (ptr!=0) {
@@ -149,7 +157,7 @@
         }
         class scoped_suspend {
         public:
- scoped_suspend(system::error_code & ec = system::throws)
+ scoped_suspend(system::error_code & ec = BOOST_CHRONO_THROWS)
                 : ptr_(instance(ec))
             {
                 if (ptr_!=0) ptr_->suspend(ec);
@@ -180,7 +188,7 @@
     class scoped_suspend<suspendible_clock<Clock> >
         : public suspendible_clock<Clock>::scoped_suspend {
     public:
- scoped_suspend(system::error_code & ec = system::throws) : suspendible_clock<Clock>::scoped_suspend(ec) {}
+ scoped_suspend(system::error_code & ec = BOOST_CHRONO_THROWS) : suspendible_clock<Clock>::scoped_suspend(ec) {}
     private:
         //~ scoped_suspend(); // = delete;
         scoped_suspend(const scoped_suspend&); // = delete;
@@ -190,6 +198,4 @@
 } // namespace stopwatches
 } // namespace boost
 
-//~ #include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif // BOOST_CHRONO_SUSPENDIBLE_CLOCK_HPP

Modified: sandbox/chrono/boost/stopwatches/t24_hours.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/t24_hours.hpp (original)
+++ sandbox/chrono/boost/stopwatches/t24_hours.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -12,7 +12,6 @@
 
 #include <boost/chrono/chrono.hpp>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
 
 namespace boost { namespace stopwatches {
 
@@ -67,6 +66,5 @@
 } // namespace stopwatches
 } // namespace boost
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
 
 #endif // BOOST_STOPWATCHES_PROCESS_CLOCK_HPP

Modified: sandbox/chrono/boost/stopwatches/t24_hours_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/t24_hours_formatter.hpp (original)
+++ sandbox/chrono/boost/stopwatches/t24_hours_formatter.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -23,8 +23,6 @@
 #include <cstring>
 #include <cassert>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
 #define BOOST_STOPWATCHES_24_HOURS_FORMAT_DEFAULT "%d day(s) %h:%m:%s.%n\n"
 
 namespace boost { namespace stopwatches {
@@ -65,8 +63,9 @@
         {
             typedef typename Stopwatch::duration duration_t;
             duration_t d = stopwatch_.elapsed( ec );
- if (ec) return;
-
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
             if ( d < duration_t::zero() ) return;
 
             boost::io::ios_flags_saver ifs( os );
@@ -161,7 +160,4 @@
 #define BOOST_STOPWATCHES_24_HOURS_FUNCTION_FORMAT BOOST_STOPWATCHES_24_HOURS_FORMAT(BOOST_CURRENT_FUNCTION)
 #endif
 
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif // BOOST_STOPWATCHES_T24_HOURS_FORMATTER_HPP

Modified: sandbox/chrono/boost/stopwatches/time_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/stopwatches/time_formatter.hpp (original)
+++ sandbox/chrono/boost/stopwatches/time_formatter.hpp 2011-02-06 12:06:30 EST (Sun, 06 Feb 2011)
@@ -23,12 +23,8 @@
 #include <cstring>
 #include <cassert>
 
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-
 #define BOOST_STOPWATCHES_TIME_FORMAT_DEFAULT "real %rs, cpu %cs (%p%), user %us, system %ss\n"
 
-
 namespace boost { namespace stopwatches {
 
 //--------------------------------------------------------------------------------------//
@@ -66,7 +62,7 @@
           // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
           // be as low as 10, although will be 15 for many common platforms.
           {
- if (&ec != &system::throws) ec.clear();
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
             typedef typename Stopwatch::duration duration;
             typedef typename duration::rep rep;
             if ( times.real < 0 ) return;
@@ -131,7 +127,9 @@
             typedef typename Stopwatch::duration duration;
             typedef typename duration::rep rep;
             duration d = stopwatch_.elapsed( ec );
- if (ec) return;
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
             rep times=d.count();
             show_time<Stopwatch>(times, format, places, os, ec);
         }
@@ -178,6 +176,4 @@
 #define BOOST_STOPWATCHES_TIME_FUNCTION_FORMAT BOOST_STOPWATCHES_TIME_FORMAT(BOOST_CURRENT_FUNCTION)
 #endif
 
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
 #endif // BOOST_STOPWATCHES_TIME_FORMATTER_HPP


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