Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
tuples.h File Reference
#include "elementa/license.inc"
#include "elementa/checks.inc"
#include <tuple>
#include <utility>
#include <type_traits>
Include dependency graph for tuples.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  elementa::adts::is_tuple< T >
 
struct  elementa::adts::is_tuple< std::tuple< Ts... > >
 

Functions

template<std::size_t I = 0, typename FuncT , typename... Tp>
std::enable_if< I==sizeof...(Tp), void >::type elementa::adts::for_each_tuple (std::tuple< Tp... > &, FuncT)
 Scan the entire tuple doing FuncT in each element. More...
 
template<std::size_t I = 0, typename FuncT , typename... Tp>
std::enable_if< I==sizeof...(Tp), void >::type elementa::adts::for_each_rev_tuple (std::tuple< Tp... > &, FuncT)
 Scan in reverse order the entire tuple doing FuncT in each element. More...
 
template<std::size_t I = 0, typename FuncT , typename... Tp>
std::enable_if<(I< sizeof...(Tp)), void >::type elementa::adts::for_each_rev_tuple (std::tuple< Tp... > &t, FuncT f)
 Scan in reverse order the entire tuple doing FuncT in each element. More...
 

Function Documentation

◆ for_each_rev_tuple()

template<std::size_t I = 0, typename FuncT , typename... Tp>
std::enable_if<(I< sizeof...(Tp)), void >::type elementa::adts::for_each_rev_tuple ( std::tuple< Tp... > &  t,
FuncT  f 
)
inline

Scan in reverse order the entire tuple doing FuncT in each element.

Note
This template function is deployed in an unrolled loop of calls when it is instantiated.

Definition at line 82 of file tuples.h.

References elementa::adts::for_each_rev_tuple().