value - make noexcept conditional + add move assigment operator

This commit is contained in:
artemp 2016-01-29 13:07:43 +01:00
parent 4233fb4abb
commit a50036d421

View file

@ -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_base>::value)
: value_base(std::move(other))
{}
template <typename T>
value ( T const& val)
@ -767,8 +770,15 @@ public:
template <typename T>
value ( T && val)
: value_base(typename detail::mapnik_value_type<T>::type(val)) {}
noexcept(std::is_nothrow_move_constructible<typename std::remove_const<T>::type>::value)
: value_base(std::move(typename detail::mapnik_value_type<T>::type(val))) {}
value & operator=( value && other)
noexcept(std::is_nothrow_move_assignable<typename std::remove_const<value_base>::type>::value)
{
value_base::operator=(std::move(other));
return *this;
}
value & operator=( value const& other) = default;
bool operator==(value const& other) const