Showing content from https://sgistl.github.io/AdaptableGenerator.html below:
Adaptable Generator
Adaptable Generator Description An Adaptable Generator is a Generator with a nested typedef that defines its result type. [1] This nested typedef makes it possible to use function object adaptors. Refinement ofGenerator Associated types Result type F::result_type The type returned when the Generator is called Notation F A type that is a model of Adaptable Generator Definitions Valid expressions None, except for those defined by Generator Expression semantics Complexity guarantees Invariants Models 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;
};
Notes
[1] Note the implication of this: a function pointer T (*f)() is a Generator, but not an Adaptable Generator: the expression f::result_type is nonsensical.
See alsoGenerator, Adaptable Unary Function, Adaptable Binary Function STL Main Page
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4