Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59107 - sandbox/chrono/boost/chrono
From: vicente.botet_at_[hidden]
Date: 2010-01-17 18:44:55


Author: viboes
Date: 2010-01-17 18:44:54 EST (Sun, 17 Jan 2010)
New Revision: 59107
URL: http://svn.boost.org/trac/boost/changeset/59107

Log:
Boost.Chrono: Version 0.3.1, Allow wide characters
* apply to stopclock and function_stopclock

Text files modified:
   sandbox/chrono/boost/chrono/function_stopclock.hpp | 25 ++++++++++++++-----------
   sandbox/chrono/boost/chrono/stopclock.hpp | 19 +++++++++++--------
   2 files changed, 25 insertions(+), 19 deletions(-)

Modified: sandbox/chrono/boost/chrono/function_stopclock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/function_stopclock.hpp (original)
+++ sandbox/chrono/boost/chrono/function_stopclock.hpp 2010-01-17 18:44:54 EST (Sun, 17 Jan 2010)
@@ -46,51 +46,54 @@
         typedef Clock clock;
         typedef Stopwatch stopwatch;
         typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
 
- explicit function_stopclock( const std::string& func, system::error_code & ec = system::throws )
+ explicit function_stopclock( const string_type& func, system::error_code & ec = system::throws )
         : base_type(ec), func_(func)
         { begin(); }
- function_stopclock( const std::string& func, std::ostream & os,
+ function_stopclock( const string_type& func, ostream_type & os,
                     system::error_code & ec = system::throws )
         : base_type(os, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, const std::string & format,
+ function_stopclock( const string_type& func, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(format, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, int places,
+ function_stopclock( const string_type& func, int places,
                     system::error_code & ec = system::throws )
         : base_type(places, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, std::ostream & os, const std::string & format,
+ function_stopclock( const string_type& func, ostream_type & os, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(os, format, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, const std::string & format, int places,
+ function_stopclock( const string_type& func, const string_type & format, int places,
                     system::error_code & ec = system::throws )
         : base_type(format, places, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, std::ostream & os, int places,
+ function_stopclock( const string_type& func, ostream_type & os, int places,
                     system::error_code & ec = system::throws )
         : base_type(os, places, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, int places, const std::string & format,
+ function_stopclock( const string_type& func, int places, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(places, format, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, std::ostream & os, const std::string & format, int places,
+ function_stopclock( const string_type& func, ostream_type & os, const string_type & format, int places,
                     system::error_code & ec = system::throws )
         : base_type(os, format, places, ec), func_(func)
         { begin(); }
 
- function_stopclock( const std::string& func, std::ostream & os, int places, const std::string & format,
+ function_stopclock( const string_type& func, ostream_type & os, int places, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(os, places, format, ec), func_(func)
         { begin(); }
@@ -105,7 +108,7 @@
         void begin() {
             this->m_os << "{{{ " << func_ << std::endl;
         }
- std::string func_;
+ string_type func_;
 
     };
 

Modified: sandbox/chrono/boost/chrono/stopclock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/stopclock.hpp (original)
+++ sandbox/chrono/boost/chrono/stopclock.hpp 2010-01-17 18:44:54 EST (Sun, 17 Jan 2010)
@@ -46,14 +46,17 @@
         typedef Clock clock;
         typedef Stopwatch stopwatch;
         typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
         
         explicit stopclock( system::error_code & ec = system::throws )
         : base_type(ec) { }
- explicit stopclock( std::ostream & os,
+ explicit stopclock( ostream_type & os,
                     system::error_code & ec = system::throws )
         : base_type(os, ec) { }
 
- explicit stopclock( const std::string & format,
+ explicit stopclock( const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(format, ec) { }
 
@@ -61,27 +64,27 @@
                     system::error_code & ec = system::throws )
         : base_type(places, ec) { }
 
- stopclock( std::ostream & os, const std::string & format,
+ stopclock( ostream_type & os, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(os, format, ec) { }
 
- stopclock( const std::string & format, int places,
+ stopclock( const string_type & format, int places,
                     system::error_code & ec = system::throws )
         : base_type(format, places, ec) { }
 
- stopclock( std::ostream & os, int places,
+ stopclock( ostream_type & os, int places,
                     system::error_code & ec = system::throws )
         : base_type(os, places, ec) { }
 
- stopclock( int places, const std::string & format,
+ stopclock( int places, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(places, format, ec) { }
 
- stopclock( std::ostream & os, const std::string & format, int places,
+ stopclock( ostream_type & os, const string_type & format, int places,
                     system::error_code & ec = system::throws )
         : base_type(os, format, places, ec) { }
 
- stopclock( std::ostream & os, int places, const std::string & format,
+ stopclock( ostream_type & os, int places, const string_type & format,
                     system::error_code & ec = system::throws )
         : base_type(os, places, format, ec) { }
 


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