update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -40,7 +40,7 @@ system_clock::now(system::error_code & ec)
{
timeval tv;
gettimeofday(&tv, 0);
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -89,7 +89,7 @@ BOOST_CHRONO_STATIC
steady_clock::rep
steady_simplified_ec(system::error_code & ec)
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -131,21 +131,21 @@ steady_full_ec(system::error_code & ec)
const double factor = chrono_detail::compute_steady_factor(err);
if (err != 0)
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
err,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return steady_clock::rep();
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -217,21 +217,21 @@ steady_clock::now(system::error_code & ec)
chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
if ( err != 0 )
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
err,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( err, ::boost::system::system_category() );
return time_point();
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}

View File

@@ -95,12 +95,12 @@ namespace boost
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
@@ -108,19 +108,19 @@ namespace boost
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds(c * factor));
} else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
@@ -129,12 +129,12 @@ namespace boost
clock_t c = ::clock();
if (c == clock_t(-1)) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
@@ -142,19 +142,19 @@ namespace boost
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds(c * factor));
} else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
@@ -171,12 +171,12 @@ namespace boost
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_user_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
@@ -184,19 +184,19 @@ namespace boost
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) * factor));
} else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_user_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
@@ -254,12 +254,12 @@ namespace boost
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_system_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
@@ -267,19 +267,19 @@ namespace boost
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) * factor));
} else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_system_cpu_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
@@ -319,12 +319,12 @@ namespace boost
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
@@ -338,12 +338,12 @@ namespace boost
return time_point(duration(r));
} else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_clock"));
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
} else
{
ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}

View File

@@ -58,21 +58,21 @@ namespace boost { namespace chrono {
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
EINVAL,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}

View File

@@ -12,6 +12,7 @@
#include <time.h> // for clock_gettime
#include <boost/assert.hpp>
#include <boost/predef/os.h>
namespace boost
{
@@ -36,22 +37,22 @@ namespace chrono
timespec ts;
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::system_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -75,11 +76,20 @@ namespace chrono
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
{
timespec ts;
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
#if BOOST_OS_CYGWIN
// lack of thread safety in high resolution timer initialization
// can lead to a timespec of zero without an error; was reported
// to the cygwin mailing list and can be removed once fixed
do
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
#endif
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
#if BOOST_OS_CYGWIN
} while (ts.tv_sec == 0 && ts.tv_nsec == 0);
#endif
return time_point(duration(
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
@@ -88,24 +98,34 @@ namespace chrono
steady_clock::time_point steady_clock::now(system::error_code & ec)
{
timespec ts;
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
#if BOOST_OS_CYGWIN
// lack of thread safety in high resolution timer initialization
// can lead to a timespec of zero without an error; was reported
// to the cygwin mailing list and can be removed once fixed
do
{
if (BOOST_CHRONO_IS_THROWS(ec))
#endif
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
#if BOOST_OS_CYGWIN
} while (ts.tv_sec == 0 && ts.tv_nsec == 0);
#endif
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}

View File

@@ -73,17 +73,17 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -91,7 +91,7 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -100,17 +100,17 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
}
else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -149,17 +149,17 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -167,7 +167,7 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -176,17 +176,17 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
}
else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -226,17 +226,17 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -244,7 +244,7 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -253,17 +253,17 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
}
else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -306,17 +306,17 @@ process_cpu_clock::time_point process_cpu_clock::now(
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
@@ -332,17 +332,17 @@ process_cpu_clock::time_point process_cpu_clock::now(
}
else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}

View File

@@ -65,21 +65,21 @@ namespace boost { namespace chrono {
if ( ::clock_gettime( clock_id, &ts ) )
#endif
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}

View File

@@ -12,9 +12,9 @@
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
#include <boost/detail/winapi/time.hpp>
#include <boost/detail/winapi/timers.hpp>
#include <boost/detail/winapi/get_last_error.hpp>
#include <boost/winapi/time.hpp>
#include <boost/winapi/timers.hpp>
#include <boost/winapi/get_last_error.hpp>
#include <boost/assert.hpp>
namespace boost
@@ -26,8 +26,8 @@ namespace chrono_detail
BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
{
boost::detail::winapi::LARGE_INTEGER_ freq;
if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) )
boost::winapi::LARGE_INTEGER_ freq;
if ( !boost::winapi::QueryPerformanceFrequency( &freq ) )
return 0.0L;
return double(1000000000.0L / freq.QuadPart);
}
@@ -38,14 +38,14 @@ namespace chrono_detail
{
double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
boost::detail::winapi::LARGE_INTEGER_ pcount;
boost::winapi::LARGE_INTEGER_ pcount;
if ( nanosecs_per_tic <= 0.0L )
{
BOOST_ASSERT(0 && "Boost::Chrono - get_nanosecs_per_tic Internal Error");
return steady_clock::time_point();
}
unsigned times=0;
while ( ! boost::detail::winapi::QueryPerformanceCounter( &pcount ) )
while ( ! boost::winapi::QueryPerformanceCounter( &pcount ) )
{
if ( ++times > 3 )
{
@@ -64,29 +64,29 @@ namespace chrono_detail
{
double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
boost::detail::winapi::LARGE_INTEGER_ pcount;
boost::winapi::LARGE_INTEGER_ pcount;
if ( (nanosecs_per_tic <= 0.0L)
|| (!boost::detail::winapi::QueryPerformanceCounter( &pcount )) )
|| (!boost::winapi::QueryPerformanceCounter( &pcount )) )
{
boost::detail::winapi::DWORD_ cause =
boost::winapi::DWORD_ cause =
((nanosecs_per_tic <= 0.0L)
? ERROR_NOT_SUPPORTED
: boost::detail::winapi::GetLastError());
if (BOOST_CHRONO_IS_THROWS(ec)) {
: boost::winapi::GetLastError());
if (::boost::chrono::is_throws(ec)) {
boost::throw_exception(
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( cause, ::boost::system::system_category() );
return steady_clock::time_point(duration(0));
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -98,8 +98,8 @@ namespace chrono_detail
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
{
boost::detail::winapi::FILETIME_ ft;
boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
boost::winapi::FILETIME_ ft;
boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
return system_clock::time_point(
system_clock::duration(
((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
@@ -113,9 +113,9 @@ namespace chrono_detail
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::now( system::error_code & ec )
{
boost::detail::winapi::FILETIME_ ft;
boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
if (!BOOST_CHRONO_IS_THROWS(ec))
boost::winapi::FILETIME_ ft;
boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}

View File

@@ -53,10 +53,10 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
boost::throw_exception(
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -103,7 +103,7 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -115,17 +115,17 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
else
{
boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( cause, ::boost::system::system_category() );
return time_point();
}
}
@@ -168,7 +168,7 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -180,17 +180,17 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
else
{
boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( cause, ::boost::system::system_category() );
return time_point();
}
}
@@ -239,7 +239,7 @@ process_cpu_clock::time_point process_cpu_clock::now(
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -257,17 +257,17 @@ process_cpu_clock::time_point process_cpu_clock::now(
else
{
boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::process_cpu_clock" ));
}
else
{
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( cause, ::boost::system::system_category() );
return time_point();
}
}

View File

@@ -43,7 +43,7 @@ thread_clock::time_point thread_clock::now( system::error_code & ec )
((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime) * 100 );
if (!BOOST_CHRONO_IS_THROWS(ec))
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
@@ -52,17 +52,17 @@ thread_clock::time_point thread_clock::now( system::error_code & ec )
}
else
{
if (BOOST_CHRONO_IS_THROWS(ec))
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
boost::detail::winapi::GetLastError(),
BOOST_CHRONO_SYSTEM_CATEGORY,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( boost::detail::winapi::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY );
ec.assign( boost::detail::winapi::GetLastError(), ::boost::system::system_category() );
return thread_clock::time_point(duration(0));
}
}