Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:33:43

0001 #ifndef BOOST_HASH2_IS_CONTIGUOUSLY_HASHABLE_HPP_INCLUDED
0002 #define BOOST_HASH2_IS_CONTIGUOUSLY_HASHABLE_HPP_INCLUDED
0003 
0004 // Copyright 2017, 2023, 2024 Peter Dimov.
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // https://www.boost.org/LICENSE_1_0.txt
0007 
0008 #include <boost/hash2/is_trivially_equality_comparable.hpp>
0009 #include <boost/hash2/is_endian_independent.hpp>
0010 #include <boost/hash2/endian.hpp>
0011 #include <type_traits>
0012 #include <cstddef>
0013 
0014 namespace boost
0015 {
0016 namespace hash2
0017 {
0018 
0019 template<class T, endian E> struct is_contiguously_hashable:
0020     std::integral_constant<bool, is_trivially_equality_comparable<T>::value && (E == endian::native || is_endian_independent<T>::value)>
0021 {
0022 };
0023 
0024 template<class T, std::size_t N, endian E> struct is_contiguously_hashable<T[N], E>:
0025     is_contiguously_hashable<T, E>
0026 {
0027 };
0028 
0029 } // namespace hash2
0030 } // namespace boost
0031 
0032 #endif // #ifndef BOOST_HASH2_IS_CONTIGUOUSLY_HASHABLE_HPP_INCLUDED