maybe_t: remove user-defined destructor

The destructor is equivalent to the compiler-generated one.  The user-defined
destructor prevents maybe_t<size_t> from bearing the predicate "trivially
copyable". Let's remove it. No functional change.
This commit is contained in:
Johannes Altmanninger 2022-10-26 14:00:24 +02:00
parent 45da77c5c5
commit 1ce2961561

View File

@ -214,8 +214,6 @@ class maybe_t : private maybe_detail::conditionally_copyable_t<T> {
bool operator==(const T &rhs) const { return this->has_value() && this->value() == rhs; }
bool operator!=(const T &rhs) const { return !(*this == rhs); }
~maybe_t() { reset(); }
};
#endif