mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
types: data_value: assert is_nothrow_move_constructible and assignable
Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <boost/locale/encoding_utf.hpp>
|
||||
#include <boost/multiprecision/cpp_int.hpp>
|
||||
#include <seastar/net/inet_address.hh>
|
||||
#include <type_traits>
|
||||
#include <unordered_set>
|
||||
#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<data_value>);
|
||||
static_assert(std::is_nothrow_move_assignable_v<data_value>);
|
||||
|
||||
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);
|
||||
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
data_value(bool_class<Tag>);
|
||||
|
||||
data_value& operator=(const data_value&);
|
||||
data_value& operator=(data_value&&);
|
||||
data_value& operator=(data_value&&) noexcept;
|
||||
const data_type& type() const {
|
||||
return _type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user