diff options
Diffstat (limited to 'libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp')
-rw-r--r-- | libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp b/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp index ae629bd4daa..6b2385da065 100644 --- a/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp @@ -19,6 +19,7 @@ #include <array> #include <cassert> +#include "test_macros.h" #include "../suppress_array_warnings.h" int main() @@ -27,6 +28,11 @@ int main() typedef double T; typedef std::array<T, 3> C; C c = {1, 2, 3.5}; - std::get<3>(c) = 5.5; // expected-error@array:* {{static_assert failed "Index out of bounds in std::get<> (std::array)"}} + std::get<3>(c) = 5.5; // expected-note {{requested here}} +#if TEST_STD_VER >= 11 + // expected-error@array:* {{static_assert failed "Index out of bounds in std::get<> (std::array)"}} +#else + // expected-error@array:* {{implicit instantiation of undefined template '__static_assert_test<false>'}} +#endif } } |