X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Ftype_traits%2Ftest%2Faligned_storage_a2_test.cpp;h=229f40200ee00ca21366f4e0a9b4eb080e5ec192;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=f33935907365405a91a65cc88e7a905505b1e309;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp b/ceph/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp index f33935907..229f40200 100644 --- a/ceph/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp +++ b/ceph/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp @@ -35,7 +35,14 @@ template void do_check(const T&) { typedef typename tt::aligned_storage::type t1; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + // In order to test this with warnings-as-errors with GCC, we need + // a slightly different initializer here to suppress spurious + // GCC warnings (ie to work around a GCC buglet). + t1 as1 = {{{ 0, }}}; +#else t1 as1 = { 0, }; +#endif must_be_pod pod1; no_unused_warning(as1); no_unused_warning(pod1); @@ -46,7 +53,11 @@ void do_check(const T&) BOOST_CHECK(::tt::is_pod::value == true); #endif typedef typename tt::aligned_storage::type t2; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + t2 as2 = {{{ 0, }}}; +#else t2 as2 = { 0, }; +#endif must_be_pod pod2; no_unused_warning(as2); no_unused_warning(pod2); @@ -60,7 +71,11 @@ void do_check(const T&) #ifndef TEST_STD // Non-Tr1 behaviour: typedef typename tt::aligned_storage::type t3; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + t3 as3 = {{{ 0, }}}; +#else t3 as3 = { 0, }; +#endif must_be_pod pod3; no_unused_warning(as3); no_unused_warning(pod3);