aboutsummaryrefslogtreecommitdiffhomepage
path: root/absl/types/optional_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/types/optional_test.cc')
-rw-r--r--absl/types/optional_test.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/absl/types/optional_test.cc b/absl/types/optional_test.cc
index 0665488..897c183 100644
--- a/absl/types/optional_test.cc
+++ b/absl/types/optional_test.cc
@@ -179,15 +179,7 @@ TEST(optionalTest, DefaultConstructor) {
TEST(optionalTest, nulloptConstructor) {
absl::optional<int> empty(absl::nullopt);
EXPECT_FALSE(empty);
-
-#ifdef ABSL_HAVE_STD_OPTIONAL
constexpr absl::optional<int> cempty{absl::nullopt};
-#else
- // Creating a temporary absl::nullopt_t object instead of using absl::nullopt
- // because absl::nullopt cannot be constexpr and have external linkage at the
- // same time.
- constexpr absl::optional<int> cempty{absl::nullopt_t(absl::nullopt_t::init)};
-#endif
static_assert(!cempty.has_value(), "");
EXPECT_TRUE((std::is_nothrow_constructible<absl::optional<int>,
absl::nullopt_t>::value));