diff --git a/include/boost/array.hpp b/include/boost/array.hpp index 4e62c55..12a2e9e 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -37,9 +37,10 @@ #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(push) -# pragma warning(disable:4510) // boost::array' : default constructor could not be generated -# pragma warning(disable:4512) // boost::array' : assignment operator could not be generated -# pragma warning(disable:4610) // class 'boost::array' can never be instantiated - user defined constructor required +# pragma warning(disable: 4510) // boost::array' : default constructor could not be generated +# pragma warning(disable: 4512) // boost::array' : assignment operator could not be generated +# pragma warning(disable: 4610) // class 'boost::array' can never be instantiated - user defined constructor required +# pragma warning(disable: 4702) // unreachable code #endif #include diff --git a/test/array_assign_test.cpp b/test/array_assign_test.cpp index b9255ca..b41d72a 100644 --- a/test/array_assign_test.cpp +++ b/test/array_assign_test.cpp @@ -4,11 +4,15 @@ #define BOOST_ALLOW_DEPRECATED_SYMBOLS +// assign is a deprecated nonstandard equivalent of fill + #include #include #include -// assign is a deprecated nonstandard equivalent of fill +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif template void test() { diff --git a/test/array_eq_test.cpp b/test/array_eq_test.cpp index c0ba3fa..1dbe9e7 100644 --- a/test/array_eq_test.cpp +++ b/test/array_eq_test.cpp @@ -6,6 +6,10 @@ #include #include +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + template void test() { { diff --git a/test/array_fill_test.cpp b/test/array_fill_test.cpp index 17ca90f..0ea3da4 100644 --- a/test/array_fill_test.cpp +++ b/test/array_fill_test.cpp @@ -6,6 +6,10 @@ #include #include +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + template void test() { boost::array a = {}; diff --git a/test/array_init_test.cpp b/test/array_init_test.cpp index 73b8808..676e9d0 100644 --- a/test/array_init_test.cpp +++ b/test/array_init_test.cpp @@ -8,6 +8,10 @@ #include #include +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + template void test1() { boost::array a = {{}}; diff --git a/test/array_lt_test.cpp b/test/array_lt_test.cpp index d2ec7f6..06f3ec5 100644 --- a/test/array_lt_test.cpp +++ b/test/array_lt_test.cpp @@ -6,6 +6,10 @@ #include #include +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + template void test() { { diff --git a/test/array_swap_test.cpp b/test/array_swap_test.cpp index fb41798..f7b178a 100644 --- a/test/array_swap_test.cpp +++ b/test/array_swap_test.cpp @@ -6,6 +6,10 @@ #include #include +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + template void test() { boost::array a1 = {}; diff --git a/test/array_swap_test2.cpp b/test/array_swap_test2.cpp index 6ad173c..e9bd1b4 100644 --- a/test/array_swap_test2.cpp +++ b/test/array_swap_test2.cpp @@ -6,6 +6,10 @@ #include #include +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + template void test() { boost::array a1 = {};