1#ifndef BOOST_ENDIAN_DETAIL_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED
2#define BOOST_ENDIAN_DETAIL_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED
3
4// Copyright 2019, 2023 Peter Dimov
5// Distributed under the Boost Software License, Version 1.0.
6// http://www.boost.org/LICENSE_1_0.txt
7
8#include <boost/config.hpp>
9#include <type_traits>
10
11namespace boost
12{
13namespace endian
14{
15namespace detail
16{
17
18#if defined( BOOST_LIBSTDCXX_VERSION ) && BOOST_LIBSTDCXX_VERSION < 50000
19
20template<class T> struct is_trivially_copyable: std::integral_constant<bool,
21 __has_trivial_copy(T) && __has_trivial_assign(T) && __has_trivial_destructor(T)> {};
22
23#else
24
25using std::is_trivially_copyable;
26
27#endif
28
29} // namespace detail
30} // namespace endian
31} // namespace boost
32
33#endif // BOOST_ENDIAN_DETAIL_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED
34

source code of boost/libs/endian/include/boost/endian/detail/is_trivially_copyable.hpp