1// Copyright 2017 Peter Dimov.
2// Distributed under the Boost Software License, Version 1.0.
3// https://www.boost.org/LICENSE_1_0.txt
4
5#ifndef BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
6#define BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
7
8#include <boost/container_hash/is_range.hpp>
9#include <type_traits>
10
11namespace boost
12{
13namespace hash_detail
14{
15
16template<class T, class E = std::true_type> struct has_hasher_: std::false_type
17{
18};
19
20template<class T> struct has_hasher_< T, std::integral_constant< bool,
21 std::is_same<typename T::hasher, typename T::hasher>::value
22 > >: std::true_type
23{
24};
25
26} // namespace hash_detail
27
28namespace container_hash
29{
30
31template<class T> struct is_unordered_range: std::integral_constant< bool, is_range<T>::value && hash_detail::has_hasher_<T>::value >
32{
33};
34
35} // namespace container_hash
36} // namespace boost
37
38#endif // #ifndef BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
39

source code of boost/libs/container_hash/include/boost/container_hash/is_unordered_range.hpp