From 21eed3fd59a70e1a5bfc49ada578572f506bfe89 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 2 May 2020 02:25:15 +0300 Subject: [PATCH] Update is_trivially_copyable to also check has_trivial_destructor in the fallback case --- include/boost/endian/detail/is_trivially_copyable.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/endian/detail/is_trivially_copyable.hpp b/include/boost/endian/detail/is_trivially_copyable.hpp index 334cd46..b34f948 100644 --- a/include/boost/endian/detail/is_trivially_copyable.hpp +++ b/include/boost/endian/detail/is_trivially_copyable.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) # include @@ -28,7 +29,7 @@ using std::is_trivially_copyable; #else template struct is_trivially_copyable: boost::integral_constant::value && boost::has_trivial_assign::value> {}; + boost::has_trivial_copy::value && boost::has_trivial_assign::value && boost::has_trivial_destructor::value> {}; #endif