Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::zip_index_detail Namespace Reference

Functions

template<class Op , class Tuple , size_t... Is>
void for_each_in_tuple_impl (Op &&op, Tuple &&t, std::index_sequence< Is... >)
 Apply a function to each element in a tuple.
 
template<class Op , class Tuple , size_t... Is>
auto transform_tuple_impl (Op &&op, Tuple &&t, std::index_sequence< Is... >)
 Transform each element in a tuple.
 
template<class Pred , class Tuple , size_t... Is>
bool all_of_tuple_impl (Pred &&pred, const Tuple &t, std::index_sequence< Is... >)
 Check if all elements satisfy a predicate.
 
template<class Pred , class Tuple , size_t... Is>
bool any_of_tuple_impl (Pred &&pred, const Tuple &t, std::index_sequence< Is... >)
 Check if any element satisfies a predicate.
 

Function Documentation

◆ all_of_tuple_impl()

template<class Pred , class Tuple , size_t... Is>
bool Aleph::zip_index_detail::all_of_tuple_impl ( Pred &&  pred,
const Tuple t,
std::index_sequence< Is... >   
)

Check if all elements satisfy a predicate.

Parameters
predPredicate to test.
tTuple to check.
Returns
true if all elements satisfy pred.

Definition at line 1780 of file ah-zip.H.

References Aleph::maps(), and pred.

Referenced by Aleph::all_of_tuple().

◆ any_of_tuple_impl()

template<class Pred , class Tuple , size_t... Is>
bool Aleph::zip_index_detail::any_of_tuple_impl ( Pred &&  pred,
const Tuple t,
std::index_sequence< Is... >   
)

Check if any element satisfies a predicate.

Parameters
predPredicate to test.
tTuple to check.
Returns
true if any element satisfies pred.

Definition at line 1791 of file ah-zip.H.

References Aleph::maps(), and pred.

Referenced by Aleph::any_of_tuple().

◆ for_each_in_tuple_impl()

template<class Op , class Tuple , size_t... Is>
void Aleph::zip_index_detail::for_each_in_tuple_impl ( Op &&  op,
Tuple &&  t,
std::index_sequence< Is... >   
)

Apply a function to each element in a tuple.

Parameters
opCallable to apply.
tTuple to iterate.

Definition at line 1758 of file ah-zip.H.

Referenced by Aleph::for_each_in_tuple().

◆ transform_tuple_impl()

template<class Op , class Tuple , size_t... Is>
auto Aleph::zip_index_detail::transform_tuple_impl ( Op &&  op,
Tuple &&  t,
std::index_sequence< Is... >   
)

Transform each element in a tuple.

Parameters
opTransformation to apply.
tInput tuple.
Returns
Tuple of transformed values.

Definition at line 1769 of file ah-zip.H.

Referenced by Aleph::transform_tuple().