mirror of
https://github.com/boostorg/endian.git
synced 2025-07-29 20:17:26 +02:00
Update is_trivially_copyable to also check has_trivial_destructor in the fallback case
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/has_trivial_copy.hpp>
|
||||
#include <boost/type_traits/has_trivial_assign.hpp>
|
||||
#include <boost/type_traits/has_trivial_destructor.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
# include <type_traits>
|
||||
@ -28,7 +29,7 @@ using std::is_trivially_copyable;
|
||||
#else
|
||||
|
||||
template<class T> struct is_trivially_copyable: boost::integral_constant<bool,
|
||||
boost::has_trivial_copy<T>::value && boost::has_trivial_assign<T>::value> {};
|
||||
boost::has_trivial_copy<T>::value && boost::has_trivial_assign<T>::value && boost::has_trivial_destructor<T>::value> {};
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user