From 7fac30e1ab6ab1015cfe4bf0d9ad3bac0375b530 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 10 Jan 2025 03:37:10 +0200 Subject: [PATCH] Fix msvc-14.0, gcc-4.x failures --- test/array_elems_test.cpp | 3 ++- test/array_init_test.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/test/array_elems_test.cpp b/test/array_elems_test.cpp index 0204c66..9506cbf 100644 --- a/test/array_elems_test.cpp +++ b/test/array_elems_test.cpp @@ -4,10 +4,11 @@ #include #include +#include template void test() { - boost::array a = {}; + boost::array a = {{}}; T (&e)[ N ] = a.elems; diff --git a/test/array_init_test.cpp b/test/array_init_test.cpp index faaa7f4..ae40fd3 100644 --- a/test/array_init_test.cpp +++ b/test/array_init_test.cpp @@ -4,6 +4,8 @@ #include #include +#include +#include #include template void test1() @@ -57,9 +59,18 @@ int main() test2(); // test2(); + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) || BOOST_WORKAROUND(BOOST_GCC, < 50000) + + // = {} doesn't work for const T + +#else + test2(); test2(); +#endif + test3(); test3();