IRIX 6.5 » Books » Developer »
Standard Template Library Programmer's Guide
(document number: 007-3426-004 / published: 1999-05-21)
table of contents | additional info | download
find in page
| Category: functors | Component type: type |
int 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()));
}
| Parameter | Description | Default |
|---|---|---|
| Arg1 | project1st's first argument type, and its result type. | |
| Arg2 | project1st's second argument type. |
| Member | Where defined | Description |
|---|---|---|
| first_argument_type | Adaptable Binary Function | The type of project1st's first argument: Arg1 |
| second_argument_type | Adaptable Binary Function | The type of project1st's second argument: Arg2 |
| result_type | Adaptable Binary Function | The type of the result: Arg1. |
| Arg1 operator()(const Arg1& x, const Arg2&) const | Adaptable Binary Function | Function call. The return value is x. |
Standard Template Library Programmer's Guide
(document number: 007-3426-004 / published: 1999-05-21)
table of contents | additional info | download
Copyright © 1993-2007 SGI, Inc. All rights reserved.