For_each applies the function object f to each element in the range [first, first+N); f's return value, if any, is ignored. Applications are performed in forward order, i.e. from first to last. The function object is passed by reference: its state after the last application is available to the caller.
More...
#include </home/runner/work/tfel/tfel/include/TFEL/FSAlgorithm/for_each.hxx>
|
| template<typename InputIterator, typename UnaryFunction> |
| static void | exe (InputIterator p, UnaryFunction &f) |
template<unsigned int N>
class tfel::fsalgo::for_each< N >
For_each applies the function object f to each element in the range [first, first+N); f's return value, if any, is ignored. Applications are performed in forward order, i.e. from first to last. The function object is passed by reference: its state after the last application is available to the caller.
- Template Parameters
-
| N | number of elements to which f will be applied |
This documentation is mostly inspired from: http://www.sgi.com/tech/stl/for_each.html
- See also
- for_each.cxx for some elementary tests.
- Author
- Thomas Helfer
- Date
- 30/06/2006
◆ exe()
template<unsigned int N>
template<typename InputIterator, typename UnaryFunction>
- Template Parameters
-
| InputIterator | input iterator |
| UnaryFunction | unary function which is applied to the elements |
- Parameters
-
| [in] | p | iterator to the first element |
| [in,out] | f | function applied to each element |
- Precondition
- InputIterator is a model of Input Iterator
- UnaryFunction is a model of Unary Function
- UnaryFunction does not apply any non-constant operation through its argument.
- InputIterator's value type is convertible to UnaryFunction's argument type.
- Author
- Thomas Helfer
- Date
- 30/06/2006
The documentation for this class was generated from the following file: