// Copyright 2017 Peter Dimov. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_HASH_IS_RANGE_HPP_INCLUDED #define BOOST_HASH_IS_RANGE_HPP_INCLUDED #include #include namespace boost { namespace hash_detail { template struct iterator_traits: std::iterator_traits {}; template<> struct iterator_traits< void* > {}; template<> struct iterator_traits< void const* > {}; template std::integral_constant< bool, !std::is_same::type, typename iterator_traits::value_type>::value > is_range_check( It first, It last ); template decltype( is_range_check( std::declval().begin(), std::declval().end() ) ) is_range_( int ); template std::false_type is_range_( ... ); } // namespace hash_detail namespace container_hash { template struct is_range: decltype( hash_detail::is_range_( 0 ) ) { }; } // namespace container_hash } // namespace boost #endif // #ifndef BOOST_HASH_IS_RANGE_HPP_INCLUDED