diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index fa69cb8..1a5e893 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -65,6 +65,13 @@ #include //for std::initializer_list #endif +//GCC 12 has a regression for array-bounds warnings +#if defined(BOOST_GCC) && (BOOST_GCC >= 120000) && (BOOST_GCC < 130000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + + namespace boost { namespace container { @@ -3589,6 +3596,11 @@ inline std::size_t hash_value(basic_string, Allocator> }} +//GCC 12 has a regression for array-bounds warnings +#if defined(BOOST_GCC) && (BOOST_GCC >= 120000) && (BOOST_GCC < 130000) +#pragma GCC diagnostic pop +#endif + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED