HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_TupleUtil.h File Reference
#include "UT_API.h"
#include <tuple>
#include <type_traits>
#include <utility>
#include <stddef.h>
+ Include dependency graph for UT_TupleUtil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UT_TupleUtilImpl::AnyOf< T, F, I, N >
 
struct  UT_TupleUtilImpl::AnyOf< T, F, N, N >
 
struct  UT_TupleUtilImpl::AnyOf< T, F, I, N >
 
struct  UT_TupleUtilImpl::ForEach< T, F, I, N >
 
struct  UT_TupleUtilImpl::ForEach< T, F, N, N >
 
struct  UT_TupleUtilImpl::ForEach< T, F, I, N >
 

Namespaces

 UT_TupleUtilImpl
 

Functions

template<typename T , typename F >
bool UTtupleAnyOf (T &&tuple, F &&f)
 
template<typename T , typename F >
void UTtupleForEach (T &&tuple, F &&f)
 

Function Documentation

template<typename T , typename F >
bool UTtupleAnyOf ( T &&  tuple,
F &&  f 
)

Invoke functor f for each element e in a tuple, returning true as soon as f(e) returns true. Returns false when f(e) is false for all elements.

Note
This is like std::any_of() except for tuples.
The tuple need not be std::tuple, and instead may be anything that supports std::get and std::tuple_size; in particular, std::array and std::pair may be used.

Definition at line 82 of file UT_TupleUtil.h.

template<typename T , typename F >
void UTtupleForEach ( T &&  tuple,
F &&  f 
)

Invoke functor f for each element e in a tuple.

Note
This is like std::for_each() except for tuples.
The tuple need not be std::tuple, and instead may be anything that supports std::get and std::tuple_size; in particular, std::array and std::pair may be used.

Definition at line 97 of file UT_TupleUtil.h.