]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / type_traits / test / aligned_storage_a2_test.cpp
index f33935907365405a91a65cc88e7a905505b1e309..229f40200ee00ca21366f4e0a9b4eb080e5ec192 100644 (file)
@@ -35,7 +35,14 @@ template <class T>
 void do_check(const T&)
 {
    typedef typename tt::aligned_storage<T::value,T::value>::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<t1> pod1;
    no_unused_warning(as1);
    no_unused_warning(pod1);
@@ -46,7 +53,11 @@ void do_check(const T&)
    BOOST_CHECK(::tt::is_pod<t1>::value == true);
 #endif
    typedef typename tt::aligned_storage<T::value*2,T::value>::type t2;
+#if defined(BOOST_GCC) && (BOOST_GCC < 40800)
+   t2 as2 = {{{ 0, }}};
+#else
    t2 as2 = { 0, };
+#endif
    must_be_pod<t2> 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<T::value,(std::size_t)(-1L)>::type t3;
+#if defined(BOOST_GCC) && (BOOST_GCC < 40800)
+   t3 as3 = {{{ 0, }}};
+#else
    t3 as3 = { 0, };
+#endif
    must_be_pod<t3> pod3;
    no_unused_warning(as3);
    no_unused_warning(pod3);