Empirical
Classes | Namespaces | Functions
tuple_utils.h File Reference

Functions to simplify the use of std::tuple. More...

#include <functional>
#include <tuple>
#include "../meta/IntPack.h"
#include "../meta/meta.h"

Go to the source code of this file.

Classes

struct  emp::TupleHash< TYPES >
 Setup tuples to be able to be used in hash tables. More...
 

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Functions

template<typename TUPLE_T >
constexpr int emp::tuple_size ()
 Quick way to calculate tuple size. More...
 
template<typename... Ts, int... Ps>
auto emp::shuffle_tuple (const std::tuple< Ts... > &tup, IntPack< Ps... >)
 Reorganize the entries in tuple; the provided int pack must specify the new ordering. More...
 
template<typename FUN_T , typename TUPLE_T , int... N>
auto emp::ApplyTuple (const FUN_T &fun, const TUPLE_T &tup, IntPack< N... >)
 
template<typename FUN_T , typename TUPLE_T >
auto emp::ApplyTuple (const FUN_T &fun, const TUPLE_T &tup)
 Apply a tuple as arguments to a function, in order. More...
 

Detailed Description

Functions to simplify the use of std::tuple.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2017
Note
Status: RELEASE