mirror of
https://github.com/boostorg/variant2.git
synced 2026-04-13 21:26:03 +02:00
Compare commits
3 Commits
feature/is
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dde1a3ac91 | ||
|
|
4a1f14cb68 | ||
|
|
b6ce8ac8ad |
@@ -625,8 +625,10 @@ template<class T1, class... T> union variant_storage_impl<mp11::mp_false, T1, T.
|
||||
T1 first_;
|
||||
variant_storage<T...> rest_;
|
||||
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 12)
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 7)
|
||||
// false positive, see https://github.com/boostorg/variant2/issues/55
|
||||
// ... and https://github.com/boostorg/variant2/pull/57
|
||||
// ... and https://github.com/boostorg/variant2/pull/58
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
@@ -635,7 +637,7 @@ template<class T1, class... T> union variant_storage_impl<mp11::mp_false, T1, T.
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 12)
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 7)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
@@ -752,10 +754,22 @@ template<class T1, class... T> union variant_storage_impl<mp11::mp_true, T1, T..
|
||||
T1 first_;
|
||||
variant_storage<T...> rest_;
|
||||
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 7)
|
||||
// false positive, see https://github.com/boostorg/variant2/issues/55
|
||||
// ... and https://github.com/boostorg/variant2/pull/57
|
||||
// ... and https://github.com/boostorg/variant2/pull/58
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
template<class... A> constexpr variant_storage_impl( mp11::mp_size_t<0>, A&&... a ): first_( std::forward<A>(a)... )
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(BOOST_GCC) && (__GNUC__ >= 7)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
template<std::size_t I, class... A> constexpr variant_storage_impl( mp11::mp_size_t<I>, A&&... a ): rest_( mp11::mp_size_t<I-1>(), std::forward<A>(a)... )
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user