select1st
Description
ExamplePrint 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<int>(cout, " "),
select1st<Map<int, double>::value_type>());
// The output is 1 33 47.
}
DefinitionDefined 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. Template parameters
Model ofAdaptableUnaryFunctionAdaptableUnaryFunctionAdaptableUnaryFunction Type requirementsThere exist some types Public base classes
Members
New membersAll of Notes[1] See also |