From abc1bf9b4ae3f45251d17b451c69c3e79dfd0cf6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 30 May 2022 18:44:07 +0300 Subject: [PATCH] Extend GCC 11 workaround to GCC 12 as well --- include/boost/function/function_template.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index f62c494..8806348 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -1010,14 +1010,14 @@ namespace boost { # pragma GCC diagnostic pop # endif } else -#if defined(BOOST_GCC) && (__GNUC__ == 11) +#if defined(BOOST_GCC) && (__GNUC__ >= 11) # pragma GCC diagnostic push -// False positive in GCC 11 for empty function objects (function_n_test.cpp:673) +// False positive in GCC 11/12 for empty function objects (function_n_test.cpp:673) # pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif get_vtable()->base.manager(f.functor, this->functor, boost::detail::function::move_functor_tag); -#if defined(BOOST_GCC) && (__GNUC__ == 11) +#if defined(BOOST_GCC) && (__GNUC__ >= 11) # pragma GCC diagnostic pop #endif f.vtable = 0;