3#include <boost/container/flat_set.hpp>
4#include <boost/endian/conversion.hpp>
30 for (
unsigned i = 0; i <
sizeof(T) / 2; ++i)
31 std::swap(bytes[i], bytes[
sizeof(T) - 1 - i]);
49template <
class T,
class Hasher>
69 integral_constant<bool, std::is_integral<T>::value || std::is_enum<T>::value || std::is_pointer<T>::value>
94template <
class T,
class U>
98 is_uniquely_represented<T>::value && is_uniquely_represented<U>::value &&
99 sizeof(T) + sizeof(U) == sizeof(std::pair<T, U>)>
110 std::conjunction_v<is_uniquely_represented<T>...> && sizeof(std::tuple<T...>) == (sizeof(T) + ...)>
117template <
class T, std::
size_t N>
125template <
class T, std::
size_t N>
128 integral_constant<bool, is_uniquely_represented<T>::value && sizeof(T) * N == sizeof(std::array<T, N>)>
147template <
class T,
class HashAlgorithm>
150 is_uniquely_represented<T>::value &&
151 (sizeof(T) == 1 || HashAlgorithm::endian == boost::endian::order::native)>
156template <
class T, std::
size_t N,
class HashAlgorithm>
160 is_uniquely_represented<T[N]>::value &&
161 (sizeof(T) == 1 || HashAlgorithm::endian == boost::endian::order::native)>
196template <
class Hasher,
class T>
203template <
class Hasher,
class T>
205 !is_contiguously_hashable<T, Hasher>::value &&
213template <
class Hasher,
class T>
223template <
class Hasher>
227 void const* p =
nullptr;
234template <
class Hasher,
class T, std::
size_t N>
238template <
class Hasher,
class CharT,
class Traits,
class Alloc>
242template <
class Hasher,
class CharT,
class Traits,
class Alloc>
246template <
class Hasher,
class T,
class U>
250template <
class Hasher,
class T,
class Alloc>
254template <
class Hasher,
class T,
class Alloc>
258template <
class Hasher,
class T, std::
size_t N>
262template <
class Hasher,
class... T>
266template <
class Hasher,
class Key,
class T,
class Hash,
class Pred,
class Alloc>
270template <
class Hasher,
class Key,
class Hash,
class Pred,
class Alloc>
274template <
class Hasher,
class Key,
class Compare,
class Alloc>
276hash_append(Hasher& h, boost::container::flat_set<Key, Compare, Alloc>
const& v)
noexcept;
277template <
class Hasher,
class Key,
class Compare,
class Alloc>
279hash_append(Hasher& h, boost::container::flat_set<Key, Compare, Alloc>
const& v)
noexcept;
280template <
class Hasher,
class T0,
class T1,
class... T>
282hash_append(Hasher& h, T0
const& t0, T1
const& t1, T
const&... t)
noexcept;
286template <
class Hasher,
class T, std::
size_t N>
290 for (
auto const& t : a)
296template <
class Hasher,
class CharT,
class Traits,
class Alloc>
305template <
class Hasher,
class CharT,
class Traits,
class Alloc>
309 h(s.data(), s.size() *
sizeof(CharT));
315template <
class Hasher,
class T,
class U>
324template <
class Hasher,
class T,
class Alloc>
328 for (
auto const& t : v)
333template <
class Hasher,
class T,
class Alloc>
337 h(v.data(), v.size() *
sizeof(T));
343template <
class Hasher,
class T, std::
size_t N>
347 for (
auto const& t : a)
351template <
class Hasher,
class Key,
class Compare,
class Alloc>
353hash_append(Hasher& h, boost::container::flat_set<Key, Compare, Alloc>
const& v)
noexcept
355 for (
auto const& t : v)
358template <
class Hasher,
class Key,
class Compare,
class Alloc>
360hash_append(Hasher& h, boost::container::flat_set<Key, Compare, Alloc>
const& v)
noexcept
362 h(&(v.begin()), v.size() *
sizeof(Key));
373template <
class Hasher,
class T>
381template <
class Hasher,
class... T,
std::size_t... I>
390template <
class Hasher,
class... T>
399template <
class Hasher,
class T>
408template <
class Hasher,
class Rep,
class Period>
415template <
class Hasher,
class Clock,
class Duration>
424template <
class Hasher,
class T0,
class T1,
class... T>
426hash_append(Hasher& h, T0
const& t0, T1
const& t1, T
const&... t)
noexcept
434template <
class HashAlgorithm>
int hash_one(Hasher &h, T const &t) noexcept
void maybe_reverse_bytes(T &t, std::false_type)
void tuple_hash(Hasher &h, std::tuple< T... > const &t, std::index_sequence< I... >) noexcept
void for_each_item(...) noexcept
std::enable_if_t< is_contiguously_hashable< T, Hasher >::value > hash_append(Hasher &h, T const &t) noexcept
Logically concatenate input data to a Hasher.
is_contiguously_hashable()=default
Metafunction returning true if the type can be hashed in one call.
is_contiguously_hashable()=default
is_uniquely_represented()=default
is_uniquely_represented()=default
is_uniquely_represented()=default
is_uniquely_represented()=default
is_uniquely_represented()=default
is_uniquely_represented()=default
is_uniquely_represented()=default
is_uniquely_represented()=default