BinaryGenerator

| Home | Libraries | People | FAQ | More

##### BinaryGenerator

###### Description

BinaryGenerator is a composite generator that has a two subjects, `left` and `right`. The BinaryGenerator allows its subjects to be treated in the same way as a single instance of a `Generator` following the Composite Design Pattern.

###### Refinement of

> `Generator`

Notation

`g`

  A BinaryGenerator.

`G`

  A BinaryGenerator type.

###### Valid Expressions

In addition to the requirements defined in `Generator`, for any BinaryGenerator the following must be met:

Expression | Semantics | Return type
--- | --- | ---
`g.left` | Left generator. | `Generator`
`g.right` | Right generator. | `Generator`

###### Type Expressions

Expression | Description
--- | ---
`G::left_type` | The left generator type.
`G::right_type` | The right generator type.
`traits::is_binary_generator<G>::type` | Metafunction that evaluates to `mpl::true_` if a certain type, `G` is a BinaryGenerator, `mpl::false_` otherwise (See MPL Boolean Constant).

###### Invariants

For any BinaryGenerator, `G`, the following invariants always hold:

- `traits::is_generator<G::left_type>::type` evaluates to `mpl::true_`
- `traits::is_generator<G::right_type>::type` evaluates to `mpl::true_`

###### Models

The following generators conform to this model:

- List (`%`).

FIXME Add more links to models of BinaryGenerator concept