diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-12-16 00:46:23 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-12-16 00:46:23 +0000 |
| commit | b58f003e866798c64be7868fc930f358e2e64819 (patch) | |
| tree | 87f8ffd07cb9554b9e4f37689a2b90f21a72a06f /libcxx | |
| parent | 8a389a578671685ba27d0ae0dfaf939447e990fa (diff) | |
| download | bcm5719-llvm-b58f003e866798c64be7868fc930f358e2e64819.tar.gz bcm5719-llvm-b58f003e866798c64be7868fc930f358e2e64819.zip | |
Once more w/o the typo.
llvm-svn: 224298
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libcxx/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp b/libcxx/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp index 0fb5aa2e9d0..adf775be25a 100644 --- a/libcxx/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp +++ b/libcxx/test/experimental/optional/optional.object/optional.object.observe/op_arrow.pass.cpp @@ -9,7 +9,7 @@ // <optional> -// T* optional<T>::operator->(); +// constexpr T* optional<T>::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<X> opt(X{}); - assert(opt->test() == 3); + constexpr optional<X> opt(X{}); + static_assert(opt->test() == 3, ""); } #ifdef _LIBCPP_DEBUG { |

