kblib 0.2.3
General utilities library for modern C++
kblib::FNV_hash< T, HashInt, void_if_t< not is_contiguous< T >::value and not std::is_integral< T >::value and not std::is_pointer< T >::value and is_trivially_hashable_v< T > > > Struct Template Reference

Hasher for any non-integral trivially copyable type that has no padding. More...

#include <kblib/hash.h>

Public Member Functions

auto operator() (T key, HashInt offset=fnv::fnv_offset< HashInt >::value) const noexcept -> HashInt
 

Detailed Description

template<typename T, typename HashInt>
struct kblib::FNV_hash< T, HashInt, void_if_t< not is_contiguous< T >::value and not std::is_integral< T >::value and not std::is_pointer< T >::value and is_trivially_hashable_v< T > > >

Hasher for any non-integral trivially copyable type that has no padding.

Note
Unfortunately, this specialization cannot be constexpr until C++20 brings std::bit_cast.

Definition at line 561 of file hash.h.

Member Function Documentation

◆ operator()()

template<typename T , typename HashInt >
auto kblib::FNV_hash< T, HashInt, void_if_t< not is_contiguous< T >::value and not std::is_integral< T >::value and not std::is_pointer< T >::value and is_trivially_hashable_v< T > > >::operator() ( key,
HashInt  offset = fnv::fnv_offset<HashInt>::value 
) const -> HashInt
inlinenoexcept

Definition at line 566 of file hash.h.


The documentation for this struct was generated from the following file: