Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:24

0001 // Copyright 2017 Peter Dimov.
0002 // Distributed under the Boost Software License, Version 1.0.
0003 // https://www.boost.org/LICENSE_1_0.txt
0004 
0005 #ifndef BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
0006 #define BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
0007 
0008 #include <boost/container_hash/is_range.hpp>
0009 #include <type_traits>
0010 
0011 namespace boost
0012 {
0013 namespace hash_detail
0014 {
0015 
0016 template<class T, class E = std::true_type> struct has_hasher_: std::false_type
0017 {
0018 };
0019 
0020 template<class T> struct has_hasher_< T, std::integral_constant< bool,
0021         std::is_same<typename T::hasher, typename T::hasher>::value
0022     > >: std::true_type
0023 {
0024 };
0025 
0026 } // namespace hash_detail
0027 
0028 namespace container_hash
0029 {
0030 
0031 template<class T> struct is_unordered_range: std::integral_constant< bool, is_range<T>::value && hash_detail::has_hasher_<T>::value >
0032 {
0033 };
0034 
0035 } // namespace container_hash
0036 } // namespace boost
0037 
0038 #endif // #ifndef BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED