ForEach Class Reference

#include <tuple.h>

Detailed Description

The constructor of ForEach allows to iterate over the values of a variadic parameter. The iteration will happen in the correct order. Example:

template <typename... T> T Sum(T... values)
T s = T();
ForEach{s += values...};
return s;
MSVC bug: the evaluation of an initializer list shall be in the correct order ( List-initialization), but MSVC doesn't stick with this. Therefore, the order of the iteration is unspecified when using MSVC.

Public Member Functions

template<typename... ARGS>
 ForEach (ARGS &&...)

Constructor & Destructor Documentation

◆ ForEach()

ForEach ( ARGS &&  ...)
ForEach(ARGS &&...)
Definition: tuple.h:27