Struct template protectboost::proto::protect — A PrimitiveTransform which prevents another PrimitiveTransform from being applied in an ObjectTransform. Synopsistemplate<typename PrimitiveTransform> struct protect : proto::transform< protect<PrimitiveTransform> > { template<typename , typename , typename > struct impl { // types typedef PrimitiveTransform result_type; }; }; Description
When building higher order transforms with
template<typename T> struct Bar {}; struct Foo : proto::when<_, Bar<_>() > {}; proto::terminal<int>::type i = {0}; int main() { Foo()(i); std::cout << typeid(Foo()(i)).name() << std::endl; }
If you actually wanted to default-construct an object of type
// OK: replace anything with Bar<_>() struct Foo : proto::when<_, Bar<protect<_> >() > {};
|