mirror of
https://github.com/mapnik/mapnik.git
synced 2026-02-01 17:36:36 +00:00
value - make noexcept conditional + add move assigment operator
This commit is contained in:
parent
4233fb4abb
commit
a50036d421
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user