kblib 0.2.3
General utilities library for modern C++
kblib::detail_hash Namespace Reference

Functions

template<typename Tuple , typename HashInt , std::size_t I>
constexpr auto hash_tuple_impl (const Tuple &tuple, HashInt offset, std::index_sequence< I >) noexcept -> HashInt
 Hash each element of a tuple. This overload is for tuples of a single type, or as the base case for the other overload. More...
 
template<typename Tuple , typename HashInt , std::size_t I, std::size_t I2, std::size_t... Is>
constexpr auto hash_tuple_impl (const Tuple &tuple, HashInt offset, std::index_sequence< I, I2, Is... >) noexcept -> HashInt
 Hash each element of a tuple. This overload is for tuples of at least 2 elements. More...
 
template<typename Tuple , std::size_t... Is>
constexpr auto all_hashable_impl (std::index_sequence< Is... >) -> bool
 
template<typename Tuple , typename std::enable_if<(std::tuple_size< Tuple >::value > 0u), int >::type = 0>
constexpr auto all_hashable () -> bool
 

Function Documentation

◆ all_hashable()

template<typename Tuple , typename std::enable_if<(std::tuple_size< Tuple >::value > 0u), int >::type = 0>
constexpr auto kblib::detail_hash::all_hashable ( ) -> bool
constexpr

Definition at line 683 of file hash.h.

◆ all_hashable_impl()

template<typename Tuple , std::size_t... Is>
constexpr auto kblib::detail_hash::all_hashable_impl ( std::index_sequence< Is... >  ) -> bool
constexpr

Definition at line 651 of file hash.h.

◆ hash_tuple_impl() [1/2]

template<typename Tuple , typename HashInt , std::size_t I>
constexpr auto kblib::detail_hash::hash_tuple_impl ( const Tuple &  tuple,
HashInt  offset,
std::index_sequence< I >   
) -> HashInt
constexprnoexcept

Hash each element of a tuple. This overload is for tuples of a single type, or as the base case for the other overload.

Parameters
tuple
offset
Returns
HashInt

Definition at line 623 of file hash.h.

◆ hash_tuple_impl() [2/2]

template<typename Tuple , typename HashInt , std::size_t I, std::size_t I2, std::size_t... Is>
constexpr auto kblib::detail_hash::hash_tuple_impl ( const Tuple &  tuple,
HashInt  offset,
std::index_sequence< I, I2, Is... >   
) -> HashInt
constexprnoexcept

Hash each element of a tuple. This overload is for tuples of at least 2 elements.

Parameters
tuple
offset
Returns
HashInt

Definition at line 639 of file hash.h.