tuple_utils.hpp

Functions to simplify the use of std::tuple Status: RELEASE.

Functions

template<typename TUPLE_T>
inline constexpr int tuple_size()

Quick way to calculate tuple size.

template<typename ...Ts, int... Ps>
auto shuffle_tuple(const std::tuple<Ts...> &tup, ValPack<Ps...>)

Reorganize the entries in tuple; the provided int pack must specify the new ordering.

template<typename TUPLE_T, typename FUN_T>
void TupleIterate(TUPLE_T &tup, const FUN_T &fun)

Call a provided function on each element of a tuple.

template<typename TUP1_T, typename TUP2_T, typename FUN_T>
void TupleIterate(TUP1_T &tup1, TUP2_T &tup2, const FUN_T &fun)

Call a provided function on each pair of elements in two tuples.

template<typename ...TYPES>
struct TupleHash
#include <tuple_utils.hpp>

Setup tuples to be able to be used in hash tables.

Public Types

using tuple_t = std::tuple<TYPES...>
using fun_t = std::function<std::size_t(TYPES...)>

Public Functions

inline std::size_t operator()(const tuple_t &tup) const