10#include <initializer_list>
17 return std::forward<TFunction>(function)(std::get<TIndices>(std::forward<TTuple>(tuple))...);
21 using Indices = std::make_index_sequence<std::tuple_size<std::decay_t<TTuple>>::value>;
26 return (
void)std::initializer_list<int>{(function(std::forward<Ts>(args)), 0)...};
30 return tupleApply([&function](
auto&&...
xs) {
forArgs(function, std::forward<
decltype(
xs)>(
xs)...); }, std::forward<TTuple>(tuple));
constexpr decltype(auto) tupleApply(TFunction &&function, TTuple &&tuple)
Definition MetaFor.hpp:20
constexpr decltype(auto) tupleApplyImpl(TFunction &&function, TTuple &&tuple, std::index_sequence< TIndices... >)
Definition MetaFor.hpp:16
constexpr decltype(auto) forTuple(TFunction &&function, TTuple &&tuple)
Definition MetaFor.hpp:29
constexpr decltype(auto) forArgs(TFunction &&function, Ts &&... args)
Definition MetaFor.hpp:25
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25