diff options
Diffstat (limited to 'test/std/containers/sequences/array/indexing.pass.cpp')
| -rw-r--r-- | test/std/containers/sequences/array/indexing.pass.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/std/containers/sequences/array/indexing.pass.cpp b/test/std/containers/sequences/array/indexing.pass.cpp index e4dda0dc5cfd..5ccb0b487b95 100644 --- a/test/std/containers/sequences/array/indexing.pass.cpp +++ b/test/std/containers/sequences/array/indexing.pass.cpp @@ -17,6 +17,12 @@ #include <array> #include <cassert> +#include "test_macros.h" + +// std::array is explicitly allowed to be initialized with A a = { init-list };. +// Disable the missing braces warning for this reason. +#include "disable_missing_braces_warning.h" + int main() { { @@ -42,13 +48,13 @@ int main() C::const_reference r2 = c[2]; assert(r2 == 3.5); } - -#if _LIBCPP_STD_VER > 11 + +#if TEST_STD_VER > 11 { typedef double T; typedef std::array<T, 3> C; constexpr C c = {1, 2, 3.5}; - + constexpr T t1 = c[0]; static_assert (t1 == 1, ""); |
