summaryrefslogtreecommitdiff
path: root/boost/chrono/duration.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/chrono/duration.hpp')
-rw-r--r--boost/chrono/duration.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/boost/chrono/duration.hpp b/boost/chrono/duration.hpp
index 814adb0..a2110bf 100644
--- a/boost/chrono/duration.hpp
+++ b/boost/chrono/duration.hpp
@@ -433,8 +433,12 @@ namespace chrono {
rep rep_;
public:
+#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
BOOST_FORCEINLINE BOOST_CONSTEXPR
duration() : rep_(duration_values<rep>::zero()) { }
+#else
+ BOOST_CONSTEXPR duration() BOOST_NOEXCEPT {};
+#endif
template <class Rep2>
BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR
explicit duration(const Rep2& r
@@ -451,14 +455,15 @@ namespace chrono {
>
>::type* = 0
) : rep_(r) { }
- //~duration() {} //= default;
-// BOOST_CONSTEXPR duration(const duration& rhs) : rep_(rhs.rep_) {} // = default;
- duration& operator=(const duration& rhs) // = default;
+#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+ duration& operator=(const duration& rhs)
{
if (&rhs != this) rep_= rhs.rep_;
return *this;
}
-
+#else
+ duration& operator=(const duration& rhs) = default;
+#endif
// conversions
template <class Rep2, class Period2>
BOOST_FORCEINLINE BOOST_CONSTEXPR