about summary refs log tree commit diff
path: root/absl/types/optional.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/types/optional.h')
-rw-r--r--absl/types/optional.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/absl/types/optional.h b/absl/types/optional.h
index 7677fe52c0e5..fd185f353f3e 100644
--- a/absl/types/optional.h
+++ b/absl/types/optional.h
@@ -467,6 +467,7 @@ struct optional_hash_base<T, decltype(std::hash<absl::remove_const_t<T> >()(
   using argument_type = absl::optional<T>;
   using result_type = size_t;
   size_t operator()(const absl::optional<T>& opt) const {
+    absl::type_traits_internal::AssertHashEnabled<absl::remove_const_t<T>>();
     if (opt) {
       return std::hash<absl::remove_const_t<T> >()(*opt);
     } else {