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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Concept ObjectTransform



An ObjectTransform is a function type or a function pointer type where the return type Obj is a an object type and the arguments are Transforms. is_callable< Obj >::value must be false. The ObjectTransform, when applied, has the effect of constructing an object of type Obj' (see below), passing as construction parameters the result(s) of applying transform(s) Tn.

The type Obj may be a template specialization representing a compile-time lambda expression. For instance, if Obj is std::pair< proto::_value, int >, the result type of the ObjectTransform is computed by replacing the type proto::_value with the result of applying the proto::_value transform. For given types Obj, Expr, State and Data, we can say that the type Obj' represents the type Obj after all nested transforms have been replaced with the results of applying the transforms with Expr, State and Data as transform arguments.

If the type Obj is not a template specialization representing a compile-time lambda expression, then the result type Obj' is the same as Obj.


A type playing the role of object-type in the ObjectTransform concept.
A type playing the role of transform-type in the ObjectTransform concept.
A type playing the role of expression-type in the ObjectTransform concept.
A type playing the role of state-type in the ObjectTransform concept.
A type playing the role of data-type in the ObjectTransform concept.
Object of type Expr
Object of type State
Object of type Data

Valid expressions

Name Expression Type Semantics

Apply Transform

when< _, Obj(Tn...)>()(expr, state, data)


Applies the transform.


  • std::pair< boost::proto::_value, int >(boost::proto::_value, int())