diff options
Diffstat (limited to 'absl/types')
-rw-r--r-- | absl/types/optional.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/types/optional.h b/absl/types/optional.h index 79475e3ea3b3..14210018815c 100644 --- a/absl/types/optional.h +++ b/absl/types/optional.h @@ -59,6 +59,7 @@ using std::nullopt; #include <type_traits> #include <utility> +#include "absl/base/attributes.h" #include "absl/memory/memory.h" #include "absl/meta/type_traits.h" #include "absl/types/bad_optional_access.h" @@ -700,7 +701,7 @@ class optional : private optional_internal::optional_data<T>, // optional::reset() // // Destroys the inner `T` value of an `absl::optional` if one is present. - void reset() noexcept { this->destruct(); } + ABSL_ATTRIBUTE_REINITIALIZES void reset() noexcept { this->destruct(); } // optional::emplace() // |