// 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 #include #include #include #include #include #include namespace boost { #if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) namespace hash_detail { 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_( ... ); } // namespace hash_detail namespace container_hash { template struct is_range: decltype( hash_detail::is_range_( 0 ) ) { }; } // namespace container_hash #else namespace hash_detail { template struct is_range_: false_type { }; template struct is_range_< T, integral_constant< bool, is_same::value_type>::value && is_integral::value > >: true_type { }; } // namespace hash_detail namespace container_hash { template struct is_range: hash_detail::is_range_ { }; } // namespace container_hash #endif // !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR) } // namespace boost #endif // #ifndef BOOST_HASH_IS_RANGE_HPP_INCLUDED