![]() |
Home | Libraries | People | FAQ | More |
boost::proto::lazy — A PrimitiveTransform that uses proto::make<> to build a CallableTransform, and then uses proto::call<> to apply it.
// In header: <boost/proto/transform/lazy.hpp> template<typename T> struct lazy : proto::transform< lazy<T> > { template<typename Expr, typename State, typename Data> struct impl : proto::transform_impl<Expr, State, Data> { // types typedef see-below result_type; // public member functions result_type operator()(typename impl::expr_param, typename impl::state_param, typename impl::data_param) const; }; };
proto::lazy<> is useful as a higher-order transform, when the transform to be applied depends on the current state of the transformation. The invocation of the proto::make<> transform evaluates any nested transforms, and the resulting type is treated as a CallableTransform, which is evaluated with proto::call<>.
For the full description of the behavior of the proto::lazy<> transform, see the documentation for the nested proto::lazy::impl<> class template.