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