Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Concept Domain

Domain

Description

A Domain creates an association between expressions and a so-called generator, which is a function that maps an expression in the default domain to an equivalent expression in this Domain. It also associates an expression with a grammar, to which all expressions within this Domain must conform.

Associated types

  • proto_grammar

    Domain::proto_grammar

    The grammar to which every expression in this Domain must conform.

  • proto_generator

    Domain::proto_generator

    A Unary Polymorphic Function that accepts expressions in the default domain and emits expressions in this Domain.

  • result_type

    boost::result_of<Domain(Expr)>::type

    The type of the result of applying proto_generator to the specified expression type. The result is required to model Expr. The domain type associated with result_type is required to be the same type as this Domain.

Notation

Domain
A type playing the role of domain-type in the Domain concept.
Expr
A type playing the role of expression-type in the Domain concept.
d
Object of type Domain
e
Object of type Expr

Valid expressions

Name Expression Type Semantics

Apply Generator

d(e)

result_type

The result of applying proto_generator to the specified expression.

Models

  • boost::proto::default_domain

PrevUpHomeNext