Disable -Wmaybe-uninitialized in function_template.hpp for GCC 11

This commit is contained in:
Peter Dimov
2021-12-16 06:18:06 +02:00
parent 61479788b8
commit 277757befc

View File

@ -1010,8 +1010,16 @@ namespace boost {
# pragma GCC diagnostic pop
# endif
} else
#if defined(BOOST_GCC) && (__GNUC__ == 11)
# pragma GCC diagnostic push
// False positive in GCC 11 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)
# pragma GCC diagnostic pop
#endif
f.vtable = 0;
} else {
clear();