From f1cac2f20ad44dbc1fa2127e0dfb9fcd0b5c27e2 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 27 Aug 2016 12:35:05 +0200 Subject: [PATCH] Fix compatibility with boost <= 1.53 refs #12555 --- lib/base/value.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/base/value.hpp b/lib/base/value.hpp index 5beba9e4a..60e213d4b 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -100,7 +100,15 @@ public: { } Value(const Value& other) = default; + +#if BOOST_VERSION >= 105400 Value(Value&& other) = default; +#else /* BOOST_VERSION */ + Value(Value&& other) + { + m_Value.swap(other.m_Value); + } +#endif /* BOOST_VERSION */ inline Value(Object *value) { @@ -125,7 +133,15 @@ public: operator String(void) const; Value& operator=(const Value& other) = default; + +#if BOOST_VERSION >= 105400 Value& operator=(Value&& other) = default; +#else /* BOOST_VERSION */ + Value& operator=(Value&& other) + { + m_Value.swap(other.m_Value); + } +#endif /* BOOST_VERSION */ bool operator==(bool rhs) const; bool operator!=(bool rhs) const; -- 2.40.0