From e51267e2d141bcf6f7c34fc49f8d0f18393f991d Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 16 Dec 2014 00:46:23 +0000 Subject: [PATCH] Once more w/o the typo. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224298 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../optional.object.observe/op_arrow.pass.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp b/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp index 0fb5aa2e..adf775be 100644 --- a/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp +++ b/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp @@ -9,7 +9,7 @@ // -// T* optional::operator->(); +// constexpr T* optional::operator->(); #ifdef _LIBCPP_DEBUG #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) @@ -25,8 +25,7 @@ using std::experimental::optional; struct X { - int test() const {return 2;} - int test() {return 3;} + constexpr int test() {return 3;} }; #endif // _LIBCPP_STD_VER > 11 @@ -35,8 +34,8 @@ int main() { #if _LIBCPP_STD_VER > 11 { - optional opt(X{}); - assert(opt->test() == 3); + constexpr optional opt(X{}); + static_assert(opt->test() == 3, ""); } #ifdef _LIBCPP_DEBUG {