mirror of
https://github.com/boostorg/unordered.git
synced 2025-08-03 05:14:28 +02:00
updated is_avalanching trait protocol
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Copyright 2021 Peter Dimov.
|
||||
// Copyright 2023 Joaquin M Lopez Munoz.
|
||||
// Copyright 2023-2024 Joaquin M Lopez Munoz.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
#include <type_traits>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@@ -341,7 +342,7 @@ template<> struct fnv1a_hash_impl<64>
|
||||
|
||||
struct fnv1a_hash: fnv1a_hash_impl< std::numeric_limits<std::size_t>::digits >
|
||||
{
|
||||
using is_avalanching = void;
|
||||
using is_avalanching = std::true_type;
|
||||
};
|
||||
|
||||
template<class K, class V> using std_unordered_map_fnv1a =
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
#include <type_traits>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@@ -262,7 +263,7 @@ template<> struct fnv1a_hash_impl<64>
|
||||
|
||||
struct fnv1a_hash: fnv1a_hash_impl< std::numeric_limits<std::size_t>::digits >
|
||||
{
|
||||
using is_avalanching = void;
|
||||
using is_avalanching = std::true_type;
|
||||
};
|
||||
|
||||
template<class K, class V> using boost_unordered_flat_map_fnv1a =
|
||||
@@ -272,7 +273,7 @@ template<class K, class V> using boost_unordered_flat_map_fnv1a =
|
||||
|
||||
struct slightly_bad_hash
|
||||
{
|
||||
using is_avalanching = void;
|
||||
using is_avalanching = std::true_type;
|
||||
|
||||
std::size_t operator()( std::string const& s ) const
|
||||
{
|
||||
@@ -295,7 +296,7 @@ template<class K, class V> using boost_unordered_flat_map_slightly_bad_hash =
|
||||
|
||||
struct bad_hash
|
||||
{
|
||||
using is_avalanching = void;
|
||||
using is_avalanching = std::true_type;
|
||||
|
||||
std::size_t operator()( std::string const& s ) const
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// Copyright 2021 Peter Dimov.
|
||||
// Copyright 2023 Joaquin M Lopez Munoz.
|
||||
// Copyright 2023-2024 Joaquin M Lopez Munoz.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
#include <type_traits>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@@ -342,7 +343,7 @@ template<> struct fnv1a_hash_impl<64>
|
||||
|
||||
struct fnv1a_hash: fnv1a_hash_impl< std::numeric_limits<std::size_t>::digits >
|
||||
{
|
||||
using is_avalanching = void;
|
||||
using is_avalanching = std::true_type;
|
||||
};
|
||||
|
||||
template<class K, class V> using std_unordered_map_fnv1a =
|
||||
|
Reference in New Issue
Block a user