add move semantics

This commit is contained in:
Yakov Olkhovskiy 2024-12-02 21:46:57 +00:00
parent 54108d5c16
commit 57e77cc815

View File

@ -485,13 +485,13 @@ public:
} }
template <typename T> auto safeGet() const && template <typename T> auto safeGet() const &&
{ {
return safeGet<T>(); return std::move(const_cast<Field *>(this)->safeGet<T>());
} }
template <typename T> auto & safeGet() &; template <typename T> auto & safeGet() &;
template <typename T> auto safeGet() && template <typename T> auto safeGet() &&
{ {
return safeGet<T>(); return std::move(safeGet<T>());
} }
bool operator< (const Field & rhs) const bool operator< (const Field & rhs) const