|
Hegel 0.11.4
Property-based testing for C++
|
A forward reference to a generator whose definition is provided later. More...
#include <combinators.h>
Public Member Functions | |
| Generator< T > | generator () const |
| Return a handle that delegates to whatever is later passed to set(). May be called multiple times. Drawing from it before set() is called throws. | |
| void | set (Generator< T > gen) |
| Set the implementation for this deferred generator. | |
A forward reference to a generator whose definition is provided later.
Created by deferred(). Call generator() to obtain handles that can be embedded in other generators before the implementation is known, then call set() to install it. This enables self-recursive and mutually recursive generators.
| T | Value type produced by the eventual generator. |
|
inline |
|
inline |
Set the implementation for this deferred generator.
All handles previously returned by generator() delegate to gen. May be called only once. A second call throws. Drawing from a handle before set() is called throws.
| gen | The generator to install as the implementation. |