diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index 78299e497..4b7a08ece 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -759,7 +759,10 @@ public: value (value const& other) = default; - value( value && other) noexcept = default; + value( value && other) + noexcept (std::is_nothrow_move_constructible::value) + : value_base(std::move(other)) + {} template value ( T const& val) @@ -767,8 +770,15 @@ public: template value ( T && val) - : value_base(typename detail::mapnik_value_type::type(val)) {} + noexcept(std::is_nothrow_move_constructible::type>::value) + : value_base(std::move(typename detail::mapnik_value_type::type(val))) {} + value & operator=( value && other) + noexcept(std::is_nothrow_move_assignable::type>::value) + { + value_base::operator=(std::move(other)); + return *this; + } value & operator=( value const& other) = default; bool operator==(value const& other) const