forked from boostorg/unordered
Pull triviality type traits into internal type_traits header
This commit is contained in:
@ -1044,13 +1044,7 @@ struct table_arrays
|
|||||||
arrays.groups(),groups_size,
|
arrays.groups(),groups_size,
|
||||||
std::integral_constant<
|
std::integral_constant<
|
||||||
bool,
|
bool,
|
||||||
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
is_trivially_default_constructible<group_type>::value
|
||||||
/* std::is_trivially_default_constructible not provided */
|
|
||||||
std::is_default_constructible<group_type>::value&&
|
|
||||||
std::has_trivial_default_constructor<group_type>::value
|
|
||||||
#else
|
|
||||||
std::is_trivially_default_constructible<group_type>::value
|
|
||||||
#endif
|
|
||||||
>{});
|
>{});
|
||||||
arrays.groups()[groups_size-1].set_sentinel();
|
arrays.groups()[groups_size-1].set_sentinel();
|
||||||
}
|
}
|
||||||
@ -2024,14 +2018,7 @@ private:
|
|||||||
x,
|
x,
|
||||||
std::integral_constant<
|
std::integral_constant<
|
||||||
bool,
|
bool,
|
||||||
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
is_trivially_copy_constructible<element_type>::value&&(
|
||||||
/* std::is_trivially_copy_constructible not provided */
|
|
||||||
std::is_copy_constructible<element_type>::value&&
|
|
||||||
std::has_trivial_copy_constructor<element_type>::value
|
|
||||||
#else
|
|
||||||
std::is_trivially_copy_constructible<element_type>::value
|
|
||||||
#endif
|
|
||||||
&&(
|
|
||||||
is_std_allocator<Allocator>::value||
|
is_std_allocator<Allocator>::value||
|
||||||
!alloc_has_construct<Allocator,value_type*,const value_type&>::value)
|
!alloc_has_construct<Allocator,value_type*,const value_type&>::value)
|
||||||
>{}
|
>{}
|
||||||
@ -2074,13 +2061,7 @@ private:
|
|||||||
|
|
||||||
void copy_groups_array_from(const table_core& x) {
|
void copy_groups_array_from(const table_core& x) {
|
||||||
copy_groups_array_from(x, std::integral_constant<bool,
|
copy_groups_array_from(x, std::integral_constant<bool,
|
||||||
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
is_trivially_copy_assignable<group_type>::value
|
||||||
/* std::is_trivially_copy_assignable not provided */
|
|
||||||
std::is_copy_assignable<group_type>::value&&
|
|
||||||
std::has_trivial_copy_assign<group_type>::value
|
|
||||||
#else
|
|
||||||
std::is_trivially_copy_assignable<group_type>::value
|
|
||||||
#endif
|
|
||||||
>{}
|
>{}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/config/workaround.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)
|
#if !defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#endif
|
#endif
|
||||||
@ -46,6 +48,43 @@ namespace boost {
|
|||||||
|
|
||||||
template <typename... Ts> using void_t = typename make_void<Ts...>::type;
|
template <typename... Ts> using void_t = typename make_void<Ts...>::type;
|
||||||
|
|
||||||
|
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
|
||||||
|
/* std::is_trivially_default_constructible not provided */
|
||||||
|
template <class T> struct is_trivially_default_constructible
|
||||||
|
{
|
||||||
|
constexpr static const bool value =
|
||||||
|
std::is_default_constructible<T>::value &&
|
||||||
|
std::has_trivial_default_constructor<T>::value;
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
using std::is_trivially_default_constructible;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
|
||||||
|
/* std::is_trivially_copy_constructible not provided */
|
||||||
|
template <class T> struct is_trivially_copy_constructible
|
||||||
|
{
|
||||||
|
|
||||||
|
constexpr static bool const value =
|
||||||
|
std::is_copy_constructible<T>::value &&
|
||||||
|
std::has_trivial_copy_constructor<T>::value;
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
using std::is_trivially_copy_constructible;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
|
||||||
|
/* std::is_trivially_copy_assignable not provided */
|
||||||
|
template <class T> struct is_trivially_copy_assignable
|
||||||
|
{
|
||||||
|
constexpr static bool const value =
|
||||||
|
std::is_copy_assignable<T>::value &&
|
||||||
|
std::has_trivial_copy_assign<T>::value;
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
using std::is_trivially_copy_assignable;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace type_traits_detail {
|
namespace type_traits_detail {
|
||||||
using std::swap;
|
using std::swap;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user