project1st
Description
Exampleint main()
{
Vector<int> v1(10, 137);
Vector<char*> v2(10, (char*) 0);
Vector<int> result(10);
transform(v1.begin(), v1.end(), v2.begin(), result.begin(),
project1st<int, char*>());
assert(equal(v1.begin(), v1.end(), result.begin()));
}
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 ofType requirementsNone. Public base classesbinary_function<Arg1, Arg2, Arg1> Members
New membersAll of NotesSee also |