mirror of
https://github.com/boostorg/variant2.git
synced 2025-07-30 20:27:17 +02:00
g++ 4.7 doesn't have std::is_trivially_destructible
This commit is contained in:
@ -504,11 +504,23 @@ using std::is_trivially_move_assignable;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined( BOOST_LIBSTDCXX_VERSION ) && BOOST_LIBSTDCXX_VERSION < 40800
|
||||||
|
|
||||||
|
template<class T> struct is_trivially_destructible: std::has_trivial_destructor<T>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
using std::is_trivially_destructible;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// variant_storage
|
// variant_storage
|
||||||
|
|
||||||
template<class D, class... T> union variant_storage_impl;
|
template<class D, class... T> union variant_storage_impl;
|
||||||
|
|
||||||
template<class... T> using variant_storage = variant_storage_impl<mp11::mp_all<std::is_trivially_destructible<T>...>, T...>;
|
template<class... T> using variant_storage = variant_storage_impl<mp11::mp_all<detail::is_trivially_destructible<T>...>, T...>;
|
||||||
|
|
||||||
template<class D> union variant_storage_impl<D>
|
template<class D> union variant_storage_impl<D>
|
||||||
{
|
{
|
||||||
@ -807,7 +819,7 @@ template<class U, class... T> using resolve_overload_index = mp11::mp_find<mp11:
|
|||||||
// variant_base
|
// variant_base
|
||||||
|
|
||||||
template<bool is_trivially_destructible, bool is_single_buffered, class... T> struct variant_base_impl;
|
template<bool is_trivially_destructible, bool is_single_buffered, class... T> struct variant_base_impl;
|
||||||
template<class... T> using variant_base = variant_base_impl<mp11::mp_all<std::is_trivially_destructible<T>...>::value, mp11::mp_all<std::is_nothrow_move_constructible<T>...>::value, T...>;
|
template<class... T> using variant_base = variant_base_impl<mp11::mp_all<detail::is_trivially_destructible<T>...>::value, mp11::mp_all<std::is_nothrow_move_constructible<T>...>::value, T...>;
|
||||||
|
|
||||||
struct none {};
|
struct none {};
|
||||||
|
|
||||||
@ -1317,7 +1329,7 @@ template<bool CopyAssignable, bool TriviallyCopyAssignable, class... T> struct v
|
|||||||
|
|
||||||
template<class... T> using variant_ca_base = variant_ca_base_impl<
|
template<class... T> using variant_ca_base = variant_ca_base_impl<
|
||||||
mp11::mp_all<std::is_copy_constructible<T>..., std::is_copy_assignable<T>...>::value,
|
mp11::mp_all<std::is_copy_constructible<T>..., std::is_copy_assignable<T>...>::value,
|
||||||
mp11::mp_all<std::is_trivially_destructible<T>..., detail::is_trivially_copy_constructible<T>..., detail::is_trivially_copy_assignable<T>...>::value,
|
mp11::mp_all<detail::is_trivially_destructible<T>..., detail::is_trivially_copy_constructible<T>..., detail::is_trivially_copy_assignable<T>...>::value,
|
||||||
T...>;
|
T...>;
|
||||||
|
|
||||||
template<class... T> struct variant_ca_base_impl<true, true, T...>: public variant_cc_base<T...>
|
template<class... T> struct variant_ca_base_impl<true, true, T...>: public variant_cc_base<T...>
|
||||||
@ -1466,7 +1478,7 @@ template<bool MoveAssignable, bool TriviallyMoveAssignable, class... T> struct v
|
|||||||
|
|
||||||
template<class... T> using variant_ma_base = variant_ma_base_impl<
|
template<class... T> using variant_ma_base = variant_ma_base_impl<
|
||||||
mp11::mp_all<std::is_move_constructible<T>..., std::is_move_assignable<T>...>::value,
|
mp11::mp_all<std::is_move_constructible<T>..., std::is_move_assignable<T>...>::value,
|
||||||
mp11::mp_all<std::is_trivially_destructible<T>..., detail::is_trivially_move_constructible<T>..., detail::is_trivially_move_assignable<T>...>::value,
|
mp11::mp_all<detail::is_trivially_destructible<T>..., detail::is_trivially_move_constructible<T>..., detail::is_trivially_move_assignable<T>...>::value,
|
||||||
T...>;
|
T...>;
|
||||||
|
|
||||||
template<class... T> struct variant_ma_base_impl<true, true, T...>: public variant_mc_base<T...>
|
template<class... T> struct variant_ma_base_impl<true, true, T...>: public variant_mc_base<T...>
|
||||||
|
Reference in New Issue
Block a user