|
|
|
|
|
|
|
|
|
|
|
|||||||
first and second members of an instance (obviously this is usually the std::pair type), and applies the respective parameterising functionals to them.
More...
#include <stlsoft_functionals.h>
Public Methods | |
| select_both () | |
| Default constructor. | |
| select_both (F1 f1, F2 f2) | |
| Constructs from the given function objects, which it will then apply via operator()(). | |
| template<typename T> void | operator() (T &t) |
Function call operator, which applies the parameterising function objects to the first and second parts of the pair t. | |
first and second members of an instance (obviously this is usually the std::pair type), and applies the respective parameterising functionals to them.
For example, if you have a std::map and wish to write out the keys with the dump_key functional and the values with the dump_value functional, you could achieve this with the following:
std::for_each(m.begin(), m.end(), stlsoft::select_both<dump_key, dump_value>());
| F1 |
The functional to apply to the first part of the elements |
| F2 |
The functional to apply to the second part of the elements |
|
|
Default constructor.
|
|
||||||||||||
|
Constructs from the given function objects, which it will then apply via operator()().
|
|
|
Function call operator, which applies the parameterising function objects to the
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |