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: concept |
| Argument type | F::argument_type | The type of F's argument |
| Result type | F::result_type | The type returned when the Unary Function is called |
| F | A type that is a model of Unary Function |
[1] Note the implication of this: a function pointer T (*f)(X) is a Unary Function, but not an Adaptable Unary Function: the expressions f::argument_type and f::result_type are nonsensical.
[2] When you define a class that is a model of Adaptable Unary Function, you must provide these typedefs. The easiest way to do this is to derive the class from the base class unary_function. This is an empty class, with no member functions or member variables; the only reason it exists is to make defining Adaptable Unary Functions more convenient. Unary_function is very similar to the base classes used by the iterator tag functions.
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.