Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
Extensions to tuple

Description


  Some extensions of the std::tuple type.
Author
Juan-Antonio Fernandez-Madrigal. http://jafma.net
Date
2020
Collaboration diagram for Extensions to tuple:

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...
 

Class Documentation

◆ elementa::adts::is_tuple

struct elementa::adts::is_tuple
template<typename T>
struct elementa::adts::is_tuple< T >

Definition at line 94 of file tuples.h.

Inheritance diagram for elementa::adts::is_tuple< T >:
Collaboration diagram for elementa::adts::is_tuple< T >:

◆ elementa::adts::is_tuple< std::tuple< Ts... > >

struct elementa::adts::is_tuple< std::tuple< Ts... > >
template<typename... Ts>
struct elementa::adts::is_tuple< std::tuple< Ts... > >

Definition at line 98 of file tuples.h.

Inheritance diagram for elementa::adts::is_tuple< std::tuple< Ts... > >:
Collaboration diagram for elementa::adts::is_tuple< std::tuple< Ts... > >:

Function Documentation

◆ for_each_tuple()

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   
)
inline

#include <elementa/adts/tuples.h>

Scan 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 54 of file tuples.h.

◆ 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... > &  ,
FuncT   
)
inline

#include <elementa/adts/tuples.h>

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 73 of file tuples.h.

Referenced by elementa::adts::for_each_rev_tuple().