1/* Hash function characterization.
2 *
3 * Copyright 2022 Joaquin M Lopez Munoz.
4 * Distributed under the Boost Software License, Version 1.0.
5 * (See accompanying file LICENSE_1_0.txt or copy at
6 * http://www.boost.org/LICENSE_1_0.txt)
7 *
8 * See https://www.boost.org/libs/unordered for library home page.
9 */
10
11#ifndef BOOST_UNORDERED_HASH_TRAITS_HPP
12#define BOOST_UNORDERED_HASH_TRAITS_HPP
13
14#include <boost/unordered/detail/type_traits.hpp>
15
16namespace boost{
17namespace unordered{
18
19namespace detail{
20
21template<typename Hash,typename=void>
22struct hash_is_avalanching_impl: std::false_type{};
23
24template<typename Hash>
25struct hash_is_avalanching_impl<Hash,
26 boost::unordered::detail::void_t<typename Hash::is_avalanching> >:
27 std::true_type{};
28
29} /* namespace detail */
30
31/* Each trait can be partially specialized by users for concrete hash functions
32 * when actual characterization differs from default.
33 */
34
35/* hash_is_avalanching<Hash>::value is true when the type Hash::is_avalanching
36 * is present, false otherwise.
37 */
38template<typename Hash>
39struct hash_is_avalanching: detail::hash_is_avalanching_impl<Hash>::type{};
40
41} /* namespace unordered */
42} /* namespace boost */
43
44#endif
45

source code of boost/libs/unordered/include/boost/unordered/hash_traits.hpp