From bb4dd8289b351fae6b55e303f189127a394a1edd Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Mon, 26 Aug 2013 08:15:55 -0400 Subject: Imported Upstream version 1.51.0 --- boost/chrono/duration.hpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'boost/chrono/duration.hpp') diff --git a/boost/chrono/duration.hpp b/boost/chrono/duration.hpp index 323474014d..e32357cc72 100644 --- a/boost/chrono/duration.hpp +++ b/boost/chrono/duration.hpp @@ -58,6 +58,10 @@ time2_demo contained this comment: #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration" #endif +#ifndef BOOST_CHRONO_HEADER_ONLY +// this must occur after all of the includes and before any code appears: +#include // must be the last #include +#endif //----------------------------------------------------------------------------// // // @@ -447,7 +451,7 @@ namespace chrono { > >::type* = 0 ) : rep_(r) { } - ~duration() {} //= default; + //~duration() {} //= default; BOOST_CONSTEXPR duration(const duration& rhs) : rep_(rhs.rep_) {} // = default; duration& operator=(const duration& rhs) // = default; @@ -660,7 +664,7 @@ namespace detail template struct duration_eq { - bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) { typedef typename common_type::type CD; return CD(lhs).count() == CD(rhs).count(); @@ -670,7 +674,7 @@ namespace detail template struct duration_eq { - bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) { return lhs.count() == rhs.count(); } @@ -679,7 +683,7 @@ namespace detail template struct duration_lt { - bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) { typedef typename common_type::type CD; return CD(lhs).count() < CD(rhs).count(); @@ -689,7 +693,7 @@ namespace detail template struct duration_lt { - bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) { return lhs.count() < rhs.count(); } @@ -783,4 +787,9 @@ namespace detail } // namespace chrono } // namespace boost +#ifndef BOOST_CHRONO_HEADER_ONLY +// the suffix header occurs after all of our code: +#include // pops abi_prefix.hpp pragmas +#endif + #endif // BOOST_CHRONO_DURATION_HPP -- cgit v1.2.3