// Distributed under the Boost Software License Version 1.0 https://www.boost.org/LICENSE_1_0.txt // Copyright Gero Peterhoff #ifndef BOOST_TYPE_TRAITS_ENDIAN_HPP #define BOOST_TYPE_TRAITS_ENDIAN_HPP #include #include #if !defined(BOOST_NO_CXX20_HDR_BIT) #include #else #include #endif namespace boost { struct is_endian_little : public std::integral_constant < bool, #if !defined(BOOST_NO_CXX20_HDR_BIT) std::endian::native == std::endian::little #else core::endian::native == core::endian::little #endif > {}; struct is_endian_big : public std::integral_constant < bool, #if !defined(BOOST_NO_CXX20_HDR_BIT) std::endian::native == std::endian::big #else core::endian::native == core::endian::big #endif > {}; #if !defined(BOOST_NO_CXX17_INLINE_VARIABLES) inline constexpr bool is_endian_little_v = is_endian_little::value; inline constexpr bool is_endian_big_v = is_endian_big::value; #endif } // boost #endif // BOOST_TYPE_TRAITS_ENDIAN_HPP