• not2
• bind1st
• bind2nd
• ptr_fun
[1] The reason for the name 'adaptable function object' is that adaptable function objects may be used by function object adaptors.
[2] The
[3] This is an example of how to use function objects; it is not the recommended way of calculating the sum of elements in a vector. The
Concepts
Generator
Category: functors
Component type: concept
A Generator is a kind of function object: an object that is called as if it were an ordinary C++ function. A Generator is called with no arguments.
Assignable
Result type | The type returned when the Generator is called |
F
A type that is a model of Generator
Result
The result type of
f
Object of type
The
Name | Expression | Return type |
---|---|---|
Function call | f() | Result |
Name | Expression | Semantics | Postcondition |
---|---|---|---|
Function call | f() | Returns some value of type | The return value is in |
• Result (*)()
[1] Two different invocations of
Function Object overview, Unary Function, Binary Function, Adaptable Generator
Unary Function
Category: functors
Component type: concept
A Unary Function is a kind of function object: an object that is called as if it were an ordinary C++ function. A Unary Function is called with a single argument.
Assignable
Argument type | The type of the Unary Function's argument. |