Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6837)

Unified Diff: base/optional_unittest.cc

Issue 2434253003: Make base::Optional constructor constexpr. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/optional.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/optional_unittest.cc
diff --git a/base/optional_unittest.cc b/base/optional_unittest.cc
index 565b6cd6c74cad6679c02c68953176b0dce11c6f..4736d5b09de7677e11ddb2e471d4e592586ec397 100644
--- a/base/optional_unittest.cc
+++ b/base/optional_unittest.cc
@@ -96,6 +96,8 @@ static_assert(
!is_trivially_destructible<Optional<NonTriviallyDestructible>>::value,
"OptionalIsTriviallyDestructible");
+static_assert(!base::Optional<bool>(), "OptionalHasConstexprConstructor");
danakj 2016/10/21 21:05:01 Can you add tests for the other constructors as we
alshabalin 2016/10/21 22:36:05 Done (partially). Reading http://en.cppreference.c
+
TEST(OptionalTest, DefaultConstructor) {
{
Optional<float> o;
« no previous file with comments | « base/optional.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698