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.

Struct template is_transform

boost::proto::is_transform — Boolean metafunction which tells whether a type is a PrimitiveTransform or not.


// In header: <boost/proto/traits.hpp>

template<typename T> 
struct is_transform :  mpl::bool_<true-or-false> {


proto::is_transform<> is used by the proto::make<> transform to determine whether a type R represents a PrimitiveTransform to apply, or whether it merely represents itself.

It is also used by the proto::call<> transform to determine whether the function types R(), R(A1), and R(A1, A2) should be passed the expression, state and data parameters (as needed).

Unless specialized for a type T, proto::is_transform<T>::value is computed as follows:

  • If T is a class type that inherits directly or indirectly from an instantiation of proto::transform<>, proto::is_transform<T>::value is true.

  • Otherwise, proto::is_transform<T>::value is false.