// Copyright 2017 Peter Dimov. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_HASH_DETAIL_IS_RANGE_HPP_INCLUDED #define BOOST_HASH_DETAIL_IS_RANGE_HPP_INCLUDED #include #include #include #include #include #include #include #include namespace boost { namespace hash_detail { #if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) template integral_constant< bool, !is_same::type, typename std::iterator_traits::value_type>::value > is_range_check( It first, It last ); template decltype( is_range_check( declval().begin(), declval().end() ) ) is_range_( int ); template false_type is_range_( ... ); template struct is_range: decltype( is_range_( 0 ) ) { }; #else template struct is_range_: false_type { }; template struct is_range_< T, integral_constant< bool, is_same::value_type>::value && is_integral::value > >: true_type { }; template struct is_range: is_range_ { }; #endif // !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR) } // namespace hash_detail } // namespace boost #endif // #ifndef BOOST_HASH_DETAIL_IS_RANGE_HPP_INCLUDED