-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Description
A move-only type with const fields, e.g. like this
struct OnlyMoveable{
OnlyMoveable() = default;
~OnlyMoveable() = default;
OnlyMoveable(OnlyMoveable &&) = default;
OnlyMoveable(OnlyMoveable const &) = delete;
auto operator=(OnlyMoveable const &) -> OnlyMoveable& = delete;
auto operator=(OnlyMoveable &&) -> OnlyMoveable& = delete;
bool const False = false;
};
gives an error because of move-assignment not being possible
/include/rfl/Variant.hpp:339:15: error: use of deleted function ‘std::optional<containers::ColumnView<double> >& std::optional<containers::ColumnView<double> >::operator=(std::optional<containers::ColumnView<double> >&&)’
339 | *_res = _f(get_alternative<_i>());
https://github.com/getml/reflect-cpp/blob/main/include/rfl/Variant.hpp#L339C1-L339C43
Maybe swap
? https://en.cppreference.com/w/cpp/utility/optional/swap
Metadata
Metadata
Assignees
Labels
No labels