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 |
| Result type | F::result_type | The type returned when the Generator is called |
| F | A type that is a model of Adaptable Generator |
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 T (*f)() is a Generator, but not an Adaptable Generator: the expression f::result_type is nonsensical.
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.