Deprecate and inline absl::optional and absl::nullopt PiperOrigin-RevId: 916205787 Change-Id: I3b9e732184f45fc33f7c9fc3976c27b45bce81f9
diff --git a/absl/types/optional.h b/absl/types/optional.h index c70efb1..eb225bf 100644 --- a/absl/types/optional.h +++ b/absl/types/optional.h
@@ -56,12 +56,16 @@ return std::make_optional<T>(il, std::forward<Args>(args)...); } -using std::nullopt; +inline constexpr const std::nullopt_t& nullopt ABSL_REFACTOR_INLINE + = std::nullopt; using nullopt_t ABSL_REFACTOR_INLINE = std::nullopt_t; -using std::optional; +template <typename T> +using optional ABSL_REFACTOR_INLINE + = std::optional<T>; + ABSL_NAMESPACE_END } // namespace absl