diff options
Diffstat (limited to 'test/std/containers/sequences/array/array.tuple/get.pass.cpp')
| -rw-r--r-- | test/std/containers/sequences/array/array.tuple/get.pass.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/std/containers/sequences/array/array.tuple/get.pass.cpp b/test/std/containers/sequences/array/array.tuple/get.pass.cpp index d9e242cd420b..4f210c4f762e 100644 --- a/test/std/containers/sequences/array/array.tuple/get.pass.cpp +++ b/test/std/containers/sequences/array/array.tuple/get.pass.cpp @@ -14,12 +14,19 @@ #include <array> #include <cassert> -#if __cplusplus > 201103L +#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" + + +#if TEST_STD_VER > 11 struct S { std::array<int, 3> a; int k; constexpr S() : a{1,2,3}, k(std::get<2>(a)) {} - }; +}; constexpr std::array<int, 2> getArr () { return { 3, 4 }; } #endif @@ -35,7 +42,7 @@ int main() assert(c[1] == 5.5); assert(c[2] == 3.5); } -#if _LIBCPP_STD_VER > 11 +#if TEST_STD_VER > 11 { typedef double T; typedef std::array<T, 3> C; |
