Fix is_trivially_copyable

This commit is contained in:
Peter Dimov
2023-10-19 19:46:53 +03:00
parent bf4a4c6eca
commit 53e2379637

View File

@ -16,14 +16,14 @@ namespace endian
namespace detail namespace detail
{ {
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) #if defined( BOOST_LIBSTDCXX_VERSION ) && BOOST_LIBSTDCXX_VERSION < 50000
using std::is_trivially_copyable; template<class T> struct is_trivially_copyable: std::integral_constant<bool,
std::has_trivial_copy_constructor<T>::value && std::has_trivial_copy_assign<T>::value && std::has_trivial_destructor<T>::value> {};
#else #else
template<class T> struct is_trivially_copyable: std::integral_constant<bool, using std::is_trivially_copyable;
std::has_trivial_copy<T>::value && std::has_trivial_assign<T>::value && std::has_trivial_destructor<T>::value> {};
#endif #endif