From 53e2379637ee4fc335d233090f4e02dc1afe7bdb Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 19 Oct 2023 19:46:53 +0300 Subject: [PATCH] Fix is_trivially_copyable --- include/boost/endian/detail/is_trivially_copyable.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/endian/detail/is_trivially_copyable.hpp b/include/boost/endian/detail/is_trivially_copyable.hpp index 1a663b7..b15d4a6 100644 --- a/include/boost/endian/detail/is_trivially_copyable.hpp +++ b/include/boost/endian/detail/is_trivially_copyable.hpp @@ -16,14 +16,14 @@ namespace endian 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 struct is_trivially_copyable: std::integral_constant::value && std::has_trivial_copy_assign::value && std::has_trivial_destructor::value> {}; #else -template struct is_trivially_copyable: std::integral_constant::value && std::has_trivial_assign::value && std::has_trivial_destructor::value> {}; +using std::is_trivially_copyable; #endif