strongdef: add move constructor and assignment operators

This commit is contained in:
Danny Robson 2019-05-08 10:33:09 +10:00
parent c3c36a662b
commit d8c8d00a4b

View File

@ -31,9 +31,11 @@ namespace cruft::strongdef {
constexpr explicit index (cruft::types::identity_t<T> const &_data): data (_data) { ; }
constexpr index (index const&) = default;
constexpr index (index &&) = default;
index& operator= (T const &) = delete;
index& operator= (index const &) = default;
index& operator= (index &&) = default;
// conversion operators must not be explicit or it defeats the point
// of this class (ease of use, transparency).