From 1ce2961561d7ffa14d211f733160f8286d264af5 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 26 Oct 2022 14:00:24 +0200 Subject: [PATCH] maybe_t: remove user-defined destructor The destructor is equivalent to the compiler-generated one. The user-defined destructor prevents maybe_t from bearing the predicate "trivially copyable". Let's remove it. No functional change. --- src/maybe.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/maybe.h b/src/maybe.h index 3c32d531c..a451787a4 100644 --- a/src/maybe.h +++ b/src/maybe.h @@ -214,8 +214,6 @@ class maybe_t : private maybe_detail::conditionally_copyable_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