Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63375 - in sandbox/chrono/libs/chrono: build src/win test
From: vicente.botet_at_[hidden]
Date: 2010-06-27 05:54:05


Author: viboes
Date: 2010-06-27 05:54:04 EDT (Sun, 27 Jun 2010)
New Revision: 63375
URL: http://svn.boost.org/trac/boost/changeset/63375

Log:
Replace uses of __ by _.
Add BOOST_COMMON_TYPE static assert configuration
Text files modified:
   sandbox/chrono/libs/chrono/build/Jamfile.v2 | 3 +++
   sandbox/chrono/libs/chrono/src/win/chrono.cpp | 18 +++++++++---------
   sandbox/chrono/libs/chrono/test/clock_name.hpp | 4 ++--
   3 files changed, 14 insertions(+), 11 deletions(-)

Modified: sandbox/chrono/libs/chrono/build/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/build/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/build/Jamfile.v2 2010-06-27 05:54:04 EDT (Sun, 27 Jun 2010)
@@ -35,10 +35,13 @@
     : usage-requirements # pass these requirement to dependents (i.e. users)
         #<os>LINUX:<threading>multi
         <library>/boost/system//boost_system
+ <define>BOOST_COMMON_TYPE_USES_STATIC_ASSERT
         <define>BOOST_RATIO_USES_STATIC_ASSERT
         <define>BOOST_CHRONO_USES_STATIC_ASSERT
+ #<define>BOOST_COMMON_TYPE_USES_MPL_ASSERT
         #<define>BOOST_RATIO_USES_MPL_ASSERT
         #<define>BOOST_CHRONO_USES_MPL_ASSERT
+ #<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
         #<define>BOOST_RATIO_USES_ARRAY_ASSERT
         #<define>BOOST_CHRONO_USES_ARRAY_ASSERT
         <link>shared:<define>BOOST_CHRONO_DYN_LINK=1

Modified: sandbox/chrono/libs/chrono/src/win/chrono.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/win/chrono.cpp (original)
+++ sandbox/chrono/libs/chrono/src/win/chrono.cpp 2010-06-27 05:54:04 EDT (Sun, 27 Jun 2010)
@@ -33,15 +33,15 @@
   {
 
     LARGE_INTEGER pcount;
- if ( nanosecs_per_tic <= 0.0L || !QueryPerformanceCounter( &pcount ) )
+ if ( (nanosecs_per_tic <= 0.0L) || (!QueryPerformanceCounter( &pcount )) )
     {
       DWORD cause = (nanosecs_per_tic <= 0.0L ? ERROR_NOT_SUPPORTED : ::GetLastError());
       boost::throw_exception(
         system::system_error( cause, system::system_category, "chrono::monotonic_clock" ));
     }
 
- return time_point(duration(
- static_cast<monotonic_clock::rep>(nanosecs_per_tic * pcount.QuadPart) ));
+ return monotonic_clock::time_point(monotonic_clock::duration(
+ static_cast<monotonic_clock::rep>((nanosecs_per_tic) * pcount.QuadPart) ));
   }
 
   monotonic_clock::time_point monotonic_clock::now( system::error_code & ec )
@@ -49,11 +49,11 @@
     static double nanosecs_per_tic = get_nanosecs_per_tic();
 
     LARGE_INTEGER pcount;
- if ( nanosecs_per_tic <= 0.0L || !QueryPerformanceCounter( &pcount ) )
+ if ( (nanosecs_per_tic <= 0.0L) || (!QueryPerformanceCounter( &pcount )) )
     {
- DWORD cause = (nanosecs_per_tic <= 0.0L ? ERROR_NOT_SUPPORTED : ::GetLastError());
+ DWORD cause = ((nanosecs_per_tic <= 0.0L) ? ERROR_NOT_SUPPORTED : ::GetLastError());
       ec.assign( cause, system::system_category );
- return time_point(duration(0));
+ return monotonic_clock::time_point(duration(0));
     }
 
     ec.clear();
@@ -65,7 +65,7 @@
   {
     FILETIME ft;
     ::GetSystemTimeAsFileTime( &ft ); // never fails
- return time_point(duration(
+ return system_clock::time_point(system_clock::duration(
       (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
   }
 
@@ -82,7 +82,7 @@
   {
       __int64 temp = t.time_since_epoch().count();
 
- # if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
+ # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
       temp -= 116444736000000000LL; // delta from epoch in microseconds
   # else
       temp -= 116444736000000000;
@@ -97,7 +97,7 @@
       __int64 temp = t;
       temp *= 10000000;
 
- # if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
+ # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
       temp += 116444736000000000LL;
   # else
       temp += 116444736000000000;

Modified: sandbox/chrono/libs/chrono/test/clock_name.hpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock_name.hpp (original)
+++ sandbox/chrono/libs/chrono/test/clock_name.hpp 2010-06-27 05:54:04 EDT (Sun, 27 Jun 2010)
@@ -8,8 +8,8 @@
 
 // See http://www.boost.org/libs/chrono for documentation.
 
-#ifndef BOOST_CHRONO_CLOCK_NAME__HPP
-#define BOOST_CHRONO_CLOCK_NAME__HPP
+#ifndef BOOST_CHRONO_CLOCK_NAME_HPP
+#define BOOST_CHRONO_CLOCK_NAME_HPP
 
 #include <boost/chrono/chrono.hpp>
 #include <boost/type_traits/is_same.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