Rodin::Utility namespace

Module containing general purpose and language support utility classes.

Classes

template<class... Ts>
struct Overloaded
Helper type for use with visitor pattern.

Functions

template<class F, class... Args>
void For(F&& f, Args && ... args) constexpr
Performs the application of the function over all the arguments.
template<size_t N, class F>
void ForIndex(F&& f) constexpr
Executes the function N times.

Function documentation

template<size_t N, class F>
void Rodin::Utility::ForIndex(F&& f) constexpr

Executes the function N times.

Template parameters
N Number of times to execute the function
F Callable type

Utilization

Utility::ForIndex<5>(
  [&](auto i){ std::cout << i.value << std::endl; });