|
|
|
|
|
|
|
|
|
|
|
|||||||
second member of an instance and applies the parameterising functional to it.
More...
#include <stlsoft_functionals.h>
Public Methods | |
| select_2nd () | |
| Default constructor. | |
| select_2nd (F f) | |
| Constructs from the given function object, which it will then apply via operator()(). | |
| template<typename T> void | operator() (T &t) |
Function call operator, which applies the parameterising function object to the second part of the pair t. | |
second member of an instance and applies the parameterising functional to it.
This functional selects the "second" member of an instance (obviously this is usually the std::pair type), and applies the parameterising functional to it.
For example, if you have a std::map and wish to write out the values with a dump_value functional, you could achieve this with the following:
std::for_each(m.begin(), m.end(), stlsoft::select_2nd<dump_value>());
| F | The parameterising functional |
|
|
Default constructor.
|
|
|
Constructs from the given function object, which it will then apply via operator()().
|
|
|
Function call operator, which applies the parameterising function object to the
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |