forked from boostorg/variant2
Suppress -Wmaybe-uninitialized in emplace_impl
This commit is contained in:
@ -685,7 +685,17 @@ template<class T1, class... T> union variant_storage_impl<mp11::mp_true, T1, T..
|
||||
|
||||
template<std::size_t I, class... A> BOOST_CXX14_CONSTEXPR void emplace_impl( mp11::mp_true, mp11::mp_size_t<I>, A&&... a )
|
||||
{
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 7)
|
||||
# pragma GCC diagnostic push
|
||||
// False positive in at least GCC 7 and GCC 10 ASAN triggered by monostate (via result<void>)
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
*this = variant_storage_impl( mp11::mp_size_t<I>(), std::forward<A>(a)... );
|
||||
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 7)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
template<std::size_t I, class... A> BOOST_CXX14_CONSTEXPR void emplace( mp11::mp_size_t<I>, A&&... a )
|
||||
|
Reference in New Issue
Block a user