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_RANGE_HPP_INCLUDED
0006 #define BOOST_HASH_IS_RANGE_HPP_INCLUDED
0007 
0008 #include <iterator>
0009 #include <type_traits>
0010 
0011 namespace boost
0012 {
0013 
0014 namespace hash_detail
0015 {
0016 
0017 template<class T, class It>
0018     std::integral_constant< bool, !std::is_same<typename std::remove_cv<T>::type, typename std::iterator_traits<It>::value_type>::value >
0019         is_range_check( It first, It last );
0020 
0021 template<class T> decltype( is_range_check<T>( std::declval<T const&>().begin(), std::declval<T const&>().end() ) ) is_range_( int );
0022 template<class T> std::false_type is_range_( ... );
0023 
0024 } // namespace hash_detail
0025 
0026 namespace container_hash
0027 {
0028 
0029 template<class T> struct is_range: decltype( hash_detail::is_range_<T>( 0 ) )
0030 {
0031 };
0032 
0033 } // namespace container_hash
0034 
0035 } // namespace boost
0036 
0037 #endif // #ifndef BOOST_HASH_IS_RANGE_HPP_INCLUDED