summaryrefslogtreecommitdiff
path: root/boost/chrono/time_point.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/chrono/time_point.hpp')
-rw-r--r--boost/chrono/time_point.hpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/boost/chrono/time_point.hpp b/boost/chrono/time_point.hpp
index bef49cb405..9aad25e66c 100644
--- a/boost/chrono/time_point.hpp
+++ b/boost/chrono/time_point.hpp
@@ -2,7 +2,7 @@
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
-// Copyright 2009-2011 Vicente J. Botet Escriba
+// Copyright 2009-2012 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
@@ -32,8 +32,11 @@ time2_demo contained this comment:
#include <boost/chrono/duration.hpp>
#include <iostream>
-#include <boost/chrono/detail/system.hpp>
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// this must occur after all of the includes and before any code appears:
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+#endif
//----------------------------------------------------------------------------//
// //
@@ -160,7 +163,7 @@ namespace chrono {
typedef typename duration::rep rep;
typedef typename duration::period period;
typedef Duration difference_type;
-
+
private:
duration d_;
@@ -194,7 +197,7 @@ namespace chrono {
// arithmetic
-#ifdef BOOST_CHRONO_EXTENSIONS
+#ifdef BOOST_CHRONO_EXTENSIONS
BOOST_CONSTEXPR
time_point operator+() const {return *this;}
BOOST_CONSTEXPR
@@ -202,13 +205,13 @@ namespace chrono {
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--(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;}
time_point& operator-=(const duration& d) {d_ -= d; return *this;}
@@ -368,4 +371,9 @@ namespace chrono {
} // namespace chrono
} // namespace boost
+#ifndef BOOST_CHRONO_HEADER_ONLY
+// the suffix header occurs after all of our code:
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#endif
+
#endif // BOOST_CHRONO_TIME_POINT_HPP