summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/chrono
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/chrono')
-rw-r--r--3rdParty/Boost/src/boost/chrono/config.hpp33
-rw-r--r--3rdParty/Boost/src/boost/chrono/detail/inlined/win/chrono.hpp91
-rw-r--r--3rdParty/Boost/src/boost/chrono/duration.hpp19
-rw-r--r--3rdParty/Boost/src/boost/chrono/system_clocks.hpp2
-rw-r--r--3rdParty/Boost/src/boost/chrono/time_point.hpp7
5 files changed, 71 insertions, 81 deletions
diff --git a/3rdParty/Boost/src/boost/chrono/config.hpp b/3rdParty/Boost/src/boost/chrono/config.hpp
index 7812dad..1045ba3 100644
--- a/3rdParty/Boost/src/boost/chrono/config.hpp
+++ b/3rdParty/Boost/src/boost/chrono/config.hpp
@@ -1,175 +1,176 @@
// boost/chrono/config.hpp -------------------------------------------------//
// Copyright Beman Dawes 2003, 2006, 2008
// Copyright 2009-2011 Vicente J. Botet Escriba
+// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_CONFIG_HPP
#define BOOST_CHRONO_CONFIG_HPP
#include <boost/config.hpp>
+#include <boost/predef.h>
#if !defined BOOST_CHRONO_VERSION
#define BOOST_CHRONO_VERSION 1
#else
#if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2
#error "BOOST_CHRONO_VERSION must be 1 or 2"
#endif
#endif
#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
#define BOOST_USE_WINDOWS_H
#endif
#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
&& ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
-# define BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
+# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
#endif
// BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
// can be defined by the user to specify which API should be used
#if defined(BOOST_CHRONO_WINDOWS_API)
# warning Boost.Chrono will use the Windows API
#elif defined(BOOST_CHRONO_MAC_API)
# warning Boost.Chrono will use the Mac API
#elif defined(BOOST_CHRONO_POSIX_API)
# warning Boost.Chrono will use the POSIX API
#endif
# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
# error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
# define BOOST_CHRONO_WINDOWS_API
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
# define BOOST_CHRONO_MAC_API
# else
# define BOOST_CHRONO_POSIX_API
# endif
# endif
# if defined( BOOST_CHRONO_WINDOWS_API )
# ifndef UNDER_CE
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# endif
# define BOOST_CHRONO_HAS_CLOCK_STEADY
-# define BOOST_CHRONO_HAS_THREAD_CLOCK
+# if BOOST_PLAT_WINDOWS_DESKTOP
+# define BOOST_CHRONO_HAS_THREAD_CLOCK
+# endif
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined( BOOST_CHRONO_MAC_API )
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# define BOOST_CHRONO_HAS_CLOCK_STEADY
+# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined( BOOST_CHRONO_POSIX_API )
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
# if defined(CLOCK_MONOTONIC)
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# endif
# if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined(sun) || defined(__sun)
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
# endif
-# if defined(__HP_aCC) && defined(__hpux)
+# if (defined(__HP_aCC) || defined(__GNUC__)) && defined(__hpux)
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
# endif
+# if defined(__VXWORKS__)
+# undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
+# endif
# endif
#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
#undef BOOST_CHRONO_HAS_THREAD_CLOCK
#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
#endif
-//#undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
-
// unicode support ------------------------------//
#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
#else
#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
#endif
-#if ! defined BOOST_NOEXCEPT
-#if defined(BOOST_NO_CXX11_NOEXCEPT)
-#define BOOST_NOEXCEPT
-#else
-#define BOOST_NOEXCEPT noexcept
-#endif
-#endif
-
+#ifndef BOOST_CHRONO_LIB_CONSTEXPR
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
#define BOOST_CHRONO_LIB_CONSTEXPR
+#elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR)
+ #define BOOST_CHRONO_LIB_CONSTEXPR
#else
-#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
+ #define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
+#endif
#endif
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
#else
-#ifdef BOOST_NO_NOEXCEPT
+#ifdef BOOST_NO_CXX11_NOEXCEPT
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
#else
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
#endif
#endif
-
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
&& defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
#endif
#if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
&& defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined"
#endif
#if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
&& ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#endif
#if (BOOST_CHRONO_VERSION == 2)
#if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
&& ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#endif
#endif
#ifdef BOOST_CHRONO_HEADER_ONLY
#define BOOST_CHRONO_INLINE inline
#define BOOST_CHRONO_STATIC inline
#define BOOST_CHRONO_DECL
#else
#define BOOST_CHRONO_INLINE
#define BOOST_CHRONO_STATIC static
// enable dynamic linking on Windows ---------------------------------------//
// we need to import/export our code only if the user has specifically
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
diff --git a/3rdParty/Boost/src/boost/chrono/detail/inlined/win/chrono.hpp b/3rdParty/Boost/src/boost/chrono/detail/inlined/win/chrono.hpp
index 75160db..16e8c51 100644
--- a/3rdParty/Boost/src/boost/chrono/detail/inlined/win/chrono.hpp
+++ b/3rdParty/Boost/src/boost/chrono/detail/inlined/win/chrono.hpp
@@ -1,160 +1,149 @@
// win/chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
-#include <boost/detail/win/time.hpp>
-#include <boost/detail/win/timers.hpp>
-#include <boost/detail/win/GetLastError.hpp>
+#include <boost/detail/winapi/time.hpp>
+#include <boost/detail/winapi/timers.hpp>
+#include <boost/detail/winapi/GetLastError.hpp>
namespace boost
{
namespace chrono
{
namespace chrono_detail
{
BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
{
- boost::detail::win32::LARGE_INTEGER_ freq;
- if ( !boost::detail::win32::QueryPerformanceFrequency( &freq ) )
+ boost::detail::winapi::LARGE_INTEGER_ freq;
+ if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) )
return 0.0L;
return double(1000000000.0L / freq.QuadPart);
}
}
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
{
- static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
+ double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
- boost::detail::win32::LARGE_INTEGER_ pcount;
- if ( (nanosecs_per_tic <= 0.0L) ||
- (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
+ boost::detail::winapi::LARGE_INTEGER_ pcount;
+ if ( nanosecs_per_tic <= 0.0L )
{
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ 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 ) )
+ {
+ if ( ++times > 3 )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - QueryPerformanceCounter Internal Error");
+ return steady_clock::time_point();
+ }
+ }
return steady_clock::time_point(steady_clock::duration(
static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
steady_clock::time_point steady_clock::now( system::error_code & ec )
{
- static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
+ double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
- boost::detail::win32::LARGE_INTEGER_ pcount;
+ boost::detail::winapi::LARGE_INTEGER_ pcount;
if ( (nanosecs_per_tic <= 0.0L)
- || (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
+ || (!boost::detail::winapi::QueryPerformanceCounter( &pcount )) )
{
- boost::detail::win32::DWORD_ cause =
+ boost::detail::winapi::DWORD_ cause =
((nanosecs_per_tic <= 0.0L)
? ERROR_NOT_SUPPORTED
- : boost::detail::win32::GetLastError());
+ : boost::detail::winapi::GetLastError());
if (BOOST_CHRONO_IS_THROWS(ec)) {
boost::throw_exception(
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
"chrono::steady_clock" ));
}
else
{
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
return steady_clock::time_point(duration(0));
}
}
if (!BOOST_CHRONO_IS_THROWS(ec))
{
ec.clear();
}
return time_point(duration(
static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
}
#endif
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
{
- boost::detail::win32::FILETIME_ ft;
- #if defined(UNDER_CE)
- // Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
- boost::detail::win32::SYSTEMTIME_ st;
- boost::detail::win32::GetSystemTime( &st );
- boost::detail::win32::SystemTimeToFileTime( &st, &ft );
- #else
- boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails
- #endif
- return system_clock::time_point(system_clock::duration(
- (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
+ boost::detail::winapi::FILETIME_ ft;
+ boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
+ return system_clock::time_point(
+ system_clock::duration(
+ ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
+ - 116444736000000000LL
+ //- (134775LL*864000000000LL)
+ )
+ );
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::now( system::error_code & ec )
{
- boost::detail::win32::FILETIME_ ft;
- #if defined(UNDER_CE)
- // Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
- boost::detail::win32::SYSTEMTIME_ st;
- boost::detail::win32::GetSystemTime( &st );
- boost::detail::win32::SystemTimeToFileTime( &st, &ft );
- #else
- boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails
- #endif
+ boost::detail::winapi::FILETIME_ ft;
+ boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
if (!BOOST_CHRONO_IS_THROWS(ec))
{
ec.clear();
}
- return time_point(duration(
- (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
+ return system_clock::time_point(
+ system_clock::duration(
+ ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
+ - 116444736000000000LL
+ //- (134775LL*864000000000LL)
+ ));
}
#endif
BOOST_CHRONO_INLINE
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
{
__int64 temp = t.time_since_epoch().count();
-
- # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
- temp -= 116444736000000000LL; // delta from epoch in microseconds
- # else
- temp -= 116444736000000000;
- # endif
-
temp /= 10000000;
return static_cast<std::time_t>( temp );
}
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
{
__int64 temp = t;
temp *= 10000000;
-
- # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
- temp += 116444736000000000LL;
- # else
- temp += 116444736000000000;
- # endif
-
return time_point(duration(temp));
}
} // namespace chrono
} // namespace boost
#endif
diff --git a/3rdParty/Boost/src/boost/chrono/duration.hpp b/3rdParty/Boost/src/boost/chrono/duration.hpp
index 97fe3d7..814adb0 100644
--- a/3rdParty/Boost/src/boost/chrono/duration.hpp
+++ b/3rdParty/Boost/src/boost/chrono/duration.hpp
@@ -385,116 +385,115 @@ struct duration_values
{
return (std::numeric_limits<Rep>::max)();
}
static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return detail::numeric_limits<Rep>::lowest();
}
};
} // namespace chrono
//----------------------------------------------------------------------------//
// 20.9.2.3 Specializations of common_type [time.traits.specializations] //
//----------------------------------------------------------------------------//
template <class Rep1, class Period1, class Rep2, class Period2>
struct common_type<chrono::duration<Rep1, Period1>,
chrono::duration<Rep2, Period2> >
{
typedef chrono::duration<typename common_type<Rep1, Rep2>::type,
typename boost::ratio_gcd<Period1, Period2>::type> type;
};
//----------------------------------------------------------------------------//
// //
// 20.9.3 Class template duration [time.duration] //
// //
//----------------------------------------------------------------------------//
namespace chrono {
template <class Rep, class Period>
- class duration
+ class BOOST_SYMBOL_VISIBLE duration
{
//BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ());
BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value,
BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<typename Period::type>::value,
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
BOOST_CHRONO_STATIC_ASSERT(Period::num>0,
BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
public:
typedef Rep rep;
typedef Period period;
private:
rep rep_;
public:
- BOOST_CONSTEXPR
+ BOOST_FORCEINLINE BOOST_CONSTEXPR
duration() : rep_(duration_values<rep>::zero()) { }
template <class Rep2>
- BOOST_CONSTEXPR
+ BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR
explicit duration(const Rep2& r
, typename boost::enable_if <
mpl::and_ <
boost::is_convertible<Rep2, rep>,
mpl::or_ <
treat_as_floating_point<rep>,
mpl::and_ <
mpl::not_ < treat_as_floating_point<rep> >,
mpl::not_ < treat_as_floating_point<Rep2> >
>
>
>
>::type* = 0
) : rep_(r) { }
//~duration() {} //= default;
- //BOOST_CONSTEXPR
- //duration(const duration& rhs) : rep_(rhs.rep_) {} // = default;
+// BOOST_CONSTEXPR duration(const duration& rhs) : rep_(rhs.rep_) {} // = default;
duration& operator=(const duration& rhs) // = default;
{
if (&rhs != this) rep_= rhs.rep_;
return *this;
}
// conversions
template <class Rep2, class Period2>
- BOOST_CONSTEXPR
+ BOOST_FORCEINLINE BOOST_CONSTEXPR
duration(const duration<Rep2, Period2>& d
, typename boost::enable_if <
mpl::or_ <
treat_as_floating_point<rep>,
mpl::and_ <
chrono_detail::is_evenly_divisible_by<Period2, period>,
mpl::not_ < treat_as_floating_point<Rep2> >
>
>
>::type* = 0
)
: rep_(chrono::detail::duration_cast<duration<Rep2, Period2>, duration>()(d).count()) {}
// observer
BOOST_CONSTEXPR
rep count() const {return rep_;}
// arithmetic
BOOST_CONSTEXPR
duration operator+() const {return duration(rep_);;}
BOOST_CONSTEXPR
duration operator-() const {return duration(-rep_);}
duration& operator++() {++rep_; return *this;}
duration operator++(int) {return duration(rep_++);}
duration& operator--() {--rep_; return *this;}
duration operator--(int) {return duration(rep_--);}
duration& operator+=(const duration& d)
{
rep_ += d.count(); return *this;
}
duration& operator-=(const duration& d)
{
@@ -632,100 +631,100 @@ namespace chrono {
template <class Rep1, class Period, class Rep2>
inline BOOST_CONSTEXPR
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
typename boost::chrono::detail::duration_modulo_result<
duration<Rep1, Period>, Rep2>::type
>::type
operator%(const duration<Rep1, Period>& d, const Rep2& s)
{
typedef typename common_type<Rep1, Rep2>::type CR;
typedef duration<CR, Period> CD;
return CD(CD(d).count()%static_cast<CR>(s));
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
operator%(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs) {
typedef typename common_type<duration<Rep1, Period1>,
duration<Rep2, Period2> >::type CD;
return CD(CD(lhs).count()%CD(rhs).count());
}
//----------------------------------------------------------------------------//
// 20.9.3.6 duration comparisons [time.duration.comparisons] //
//----------------------------------------------------------------------------//
namespace detail
{
template <class LhsDuration, class RhsDuration>
struct duration_eq
{
- BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
+ BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const
{
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
return CD(lhs).count() == CD(rhs).count();
}
};
template <class LhsDuration>
struct duration_eq<LhsDuration, LhsDuration>
{
- BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
+ BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const
{
return lhs.count() == rhs.count();
}
};
template <class LhsDuration, class RhsDuration>
struct duration_lt
{
- BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
+ BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const
{
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
return CD(lhs).count() < CD(rhs).count();
}
};
template <class LhsDuration>
struct duration_lt<LhsDuration, LhsDuration>
{
- BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
+ BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const
{
return lhs.count() < rhs.count();
}
};
} // namespace detail
// Duration ==
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator==(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return boost::chrono::detail::duration_eq<
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
}
// Duration !=
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator!=(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return !(lhs == rhs);
}
// Duration <
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
diff --git a/3rdParty/Boost/src/boost/chrono/system_clocks.hpp b/3rdParty/Boost/src/boost/chrono/system_clocks.hpp
index df8b79e..5ba6a3b 100644
--- a/3rdParty/Boost/src/boost/chrono/system_clocks.hpp
+++ b/3rdParty/Boost/src/boost/chrono/system_clocks.hpp
@@ -35,71 +35,71 @@ TODO:
> In the past I've seen QueryPerformanceCounter give incorrect results,
> especially with SpeedStep processors on laptops. This was many years ago and
> might have been fixed by service packs and drivers.
>
> Typically you check the results of QPC against GetTickCount to see if the
> results are reasonable.
> http://support.microsoft.com/kb/274323
>
> I've also heard of problems with QueryPerformanceCounter in multi-processor
> systems.
>
> I know some people SetThreadAffinityMask to 1 for the current thread call
> their QueryPerformance* functions then restore SetThreadAffinityMask. This
> seems horrible to me because it forces your program to jump to another
> physical processor if it isn't already on cpu0 but they claim it worked well
> in practice because they called the timing functions infrequently.
>
> In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
> high resolution timers to avoid these issues.
*/
#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP
#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/duration.hpp>
#include <boost/chrono/time_point.hpp>
#include <boost/chrono/detail/system.hpp>
#include <boost/chrono/clock_string.hpp>
#include <ctime>
# if defined( BOOST_CHRONO_POSIX_API )
-# if ! defined(CLOCK_REALTIME)
+# if ! defined(CLOCK_REALTIME) && ! defined (__hpux__)
# error <time.h> does not supply CLOCK_REALTIME
# endif
# endif
#ifdef BOOST_CHRONO_WINDOWS_API
// The system_clock tick is 100 nanoseconds
# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
#else
# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
#endif
// this must occur after all of the includes and before any code appears:
#ifndef BOOST_CHRONO_HEADER_ONLY
#include <boost/config/abi_prefix.hpp> // must be the last #include
#endif
//----------------------------------------------------------------------------//
// //
// 20.9 Time utilities [time] //
// synopsis //
// //
//----------------------------------------------------------------------------//
namespace boost {
namespace chrono {
// Clocks
class BOOST_CHRONO_DECL system_clock;
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
class BOOST_CHRONO_DECL steady_clock;
#endif
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires]
diff --git a/3rdParty/Boost/src/boost/chrono/time_point.hpp b/3rdParty/Boost/src/boost/chrono/time_point.hpp
index 7e80b59..6449fac 100644
--- a/3rdParty/Boost/src/boost/chrono/time_point.hpp
+++ b/3rdParty/Boost/src/boost/chrono/time_point.hpp
@@ -136,80 +136,81 @@ namespace chrono {
const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template <class Clock, class Duration1, class Duration2>
inline BOOST_CONSTEXPR
bool operator>=(
const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
// time_point_cast
template <class ToDuration, class Clock, class Duration>
inline BOOST_CONSTEXPR
time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
//----------------------------------------------------------------------------//
// //
// 20.9.4 Class template time_point [time.point] //
// //
//----------------------------------------------------------------------------//
template <class Clock, class Duration>
class time_point
{
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration<Duration>::value,
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration));
public:
typedef Clock clock;
typedef Duration duration;
typedef typename duration::rep rep;
typedef typename duration::period period;
typedef Duration difference_type;
private:
duration d_;
public:
- BOOST_CONSTEXPR
+ BOOST_FORCEINLINE BOOST_CONSTEXPR
time_point() : d_(duration::zero())
{}
- BOOST_CONSTEXPR explicit time_point(const duration& d)
+ BOOST_FORCEINLINE BOOST_CONSTEXPR
+ explicit time_point(const duration& d)
: d_(d)
{}
// conversions
template <class Duration2>
- BOOST_CONSTEXPR
+ BOOST_FORCEINLINE BOOST_CONSTEXPR
time_point(const time_point<clock, Duration2>& t
, typename boost::enable_if
<
boost::is_convertible<Duration2, duration>
>::type* = 0
)
: d_(t.time_since_epoch())
{
}
// observer
BOOST_CONSTEXPR
duration time_since_epoch() const
{
return d_;
}
// arithmetic
#ifdef BOOST_CHRONO_EXTENSIONS
BOOST_CONSTEXPR
time_point operator+() const {return *this;}
BOOST_CONSTEXPR
time_point operator-() const {return time_point(-d_);}
time_point& operator++() {++d_; return *this;}
time_point operator++(int) {return time_point(d_++);}
time_point& operator--() {--d_; return *this;}
time_point operator--(int) {return time_point(d_--);}
time_point& operator+=(const rep& r) {d_ += duration(r); return *this;}
time_point& operator-=(const rep& r) {d_ -= duration(r); return *this;}
#endif
time_point& operator+=(const duration& d) {d_ += d; return *this;}