|
SUNphi
1.0
|
Access elements of a tuple. More...
#include <ints/Ranges.hpp>#include <metaprogramming/SFINAE.hpp>#include <metaprogramming/UniversalReferences.hpp>#include <tuple/TupleClass.hpp>#include <tuple/TupleOrder.hpp>Go to the source code of this file.
Functions | |
| template<std::size_t I, class T > | |
| constexpr std::tuple_element_t< I, T > && | SUNphi::get (T &&t) |
| template<class Tg , class T > | |
| constexpr Tg && | SUNphi::get (T &&t) |
| template<size_t I = 0, typename T , typename F , typename = EnableIf<isTupleLike<T>>> | |
| void | SUNphi::forEach (T &&t, F &&f) |
| template<typename Tp , int... Ints> | |
| decltype(auto) | SUNphi::getIndexed (const IntSeq< Ints... > &, Tp &&tp) |
| template<int N, typename Tp , TypeIf<(isTuple< Tp >), void * > = nullptr> | |
| decltype(auto) | SUNphi::getHead (Tp &&tp) |
| template<int N, typename Tp , TypeIf<(isTuple< Tp >), void * > = nullptr> | |
| decltype(auto) | SUNphi::getTail (const Tp &&tp) |
| template<int N, typename Tp , TypeIf<(isTuple< Tp >), void * > = nullptr> | |
| decltype(auto) | SUNphi::getAllButPos (Tp &&tp) |
| template<typename Tg , typename Tp , TypeIf<(isTuple< Tp >), void * > = nullptr> | |
| decltype(auto) | SUNphi::getAllButType (Tp &&tp) |
Access elements of a tuple.
Definition in file TupleElements.hpp.
| void SUNphi::forEach | ( | T && | t, |
| F && | f | ||
| ) |
Loop over all Tuple elements
Non const access to all elements of the Tuple, called recursively until I==sizeof...(Tp), incrementing the parameter I.
| I | Index of the Tuple element to extract |
| Func | Function type |
| Tp... | The Tuple parameters |
void | t | Tuple to act upon |
| f | Function iterating on the Tuple |
Definition at line 55 of file TupleElements.hpp.
| constexpr std::tuple_element_t<I,T>&& SUNphi::get | ( | T && | t | ) |
Gets an element from the tuple.
Directly aliasing the std library. R-value case
Definition at line 23 of file TupleElements.hpp.
| constexpr Tg&& SUNphi::get | ( | T && | t | ) |
Gets the element of type T from the tuple.
Directly aliasing the std library. R-value case.
Definition at line 34 of file TupleElements.hpp.
| decltype(auto) SUNphi::getAllButPos | ( | Tp && | tp | ) |
Returns all elements of a Tuple but the N-th one
Takes the list of component according to an index containing the first [0,N) and (N,Sizeof...(Tuple))
Example:
Definition at line 125 of file TupleElements.hpp.
| decltype(auto) SUNphi::getAllButType | ( | Tp && | tp | ) |
Returns all elements of a Tuple but the type T
First search the component, then call GetAllBut with the found position as a parameter
Example:
Definition at line 143 of file TupleElements.hpp.
| decltype(auto) SUNphi::getHead | ( | Tp && | tp | ) |
Gets the head of a Tuple
Return a tuple containg the first N elements of a tuple
| tp | Tuple from which to extract |
Definition at line 86 of file TupleElements.hpp.
| decltype(auto) SUNphi::getIndexed | ( | const IntSeq< Ints... > & | , |
| Tp && | tp | ||
| ) |
Filter a Tuple on the basis of a list of index
Return a tuple containg the elements of a tuple according to a list of indices
Definition at line 73 of file TupleElements.hpp.
| decltype(auto) SUNphi::getTail | ( | const Tp && | tp | ) |
Gets the tail of a Tuple
Return a Tuple containg the last N elements of a tuple
Number of elements in the tuple
Beginning of returned part
| tp | Tuple from which to extract |
Definition at line 98 of file TupleElements.hpp.