Name | Expression | Return type |
---|---|---|
Function call | f(x,y) | Result |
Name | Expression | Precondition | Semantics | Postcondition |
---|---|---|---|---|
Function call | f(x,y) | The ordered pair | Calls | The return value is in |
• Result (*)(X,Y)
[1] Two different invocations of
Function Object overview, Generator, Unary Function, Adaptable Binary Function
Adaptable Generator
Category: functors
Component type: concept
An Adaptable Generator is a Generator with a nested
Generator
Result type | F::result_type | The type returned when the Generator is called |
F
A type that is a model of Adaptable Generator
None, except for those defined by Generator
The STL does not include any types that are models of Adaptable Generator. An example of a user-defined Adaptable Generator is as follows.
struct counter {
typedef int result_type;
counter() : n(0) {}
result_type operator()() { return n++; }
result_type n;
};
[1] Note the implication of this: a function pointer
Generator, Adaptable Unary Function, Adaptable Binary Function
Adaptable Unary Function
Category: functors
Component type: concept
An Adaptable Unary Function is a Unary Function with nested
Unary Function
Argument type | F::argument_type | The type of |
Result type | F::result_type |