mirror of
https://github.com/boostorg/function.git
synced 2025-07-30 21:07:13 +02:00
Avoid another -Wmaybe-uninitialized under GCC 11/12
This commit is contained in:
@ -501,8 +501,16 @@ namespace boost {
|
|||||||
|
|
||||||
void clear(function_buffer& functor) const
|
void clear(function_buffer& functor) const
|
||||||
{
|
{
|
||||||
|
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
// False positive in GCC 11/12 for empty function objects
|
||||||
|
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
#endif
|
||||||
if (base.manager)
|
if (base.manager)
|
||||||
base.manager(functor, functor, destroy_functor_tag);
|
base.manager(functor, functor, destroy_functor_tag);
|
||||||
|
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user