Pair | The function object's argument type. |
Adaptable Unary Function
There exist some types
unary_function<Pair, Pair::first_type>
Member | Where defined | Description |
---|---|---|
argument_type | Adaptable Unary Function | The type of |
result_type | Adaptable Unary Function The type of the result: | |
const Pair::first_type& operator()(const Pair& p) const | Adaptable Unary Function | Function call. The return value is |
All of
[1]
select2nd<Pair>
Category: functors
Component type: type
Print all of a
int main() {
map<int, double> M;
M[1] = 0.3;
M[47] = 0.8;
M[33] = 0.1;
transform(M.begin(), M.end(), ostream_iterator<double>(cout, ' '), select2nd<map<int, double>::value_type>());
// The output is 0.3 0.1 0.8
}
Defined in the standard header functional, and in the nonstandard backward-compatibility header function.h. This function object is an SGI extension; it is not part of the C++ standard.
Parameter | Description |
---|---|
Pair | The function object's argument type. |
Adaptable Unary Function
There exist some types
unary_function<Pair, Pair::second_type>
Member | Where defined | Description |
---|---|---|