diff --git a/types/types.cc b/types/types.cc index 9e49b19711..d18a0e840f 100644 --- a/types/types.cc +++ b/types/types.cc @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "utils/big_decimal.hh" #include "utils/date.h" @@ -55,6 +56,9 @@ #include "types/set.hh" #include "types/listlike_partial_deserializing_iterator.hh" +static_assert(std::is_nothrow_move_constructible_v); +static_assert(std::is_nothrow_move_assignable_v); + static logging::logger tlogger("types"); bytes_view_opt read_collection_value(bytes_view& in); @@ -3799,7 +3803,7 @@ data_value::data_value(const data_value& v) : _value(nullptr), _type(v._type) { } data_value& -data_value::operator=(data_value&& x) { +data_value::operator=(data_value&& x) noexcept { auto tmp = std::move(x); std::swap(tmp._value, this->_value); std::swap(tmp._type, this->_type); diff --git a/types/types.hh b/types/types.hh index f13a7767de..fd89b35d83 100644 --- a/types/types.hh +++ b/types/types.hh @@ -261,7 +261,7 @@ public: data_value(bool_class); data_value& operator=(const data_value&); - data_value& operator=(data_value&&); + data_value& operator=(data_value&&) noexcept; const data_type& type() const { return _type; }