![]() |
Home | Libraries | People | FAQ | More |
boost::proto::by_value_generator — A generator that replaces child nodes held by reference with ones held by value. Use with proto::compose_generators<> to forward that result to another generator.
// In header: <boost/proto/generate.hpp> struct by_value_generator : proto::callable { template<typename This, typename Expr> struct result<This(Expr)> { // types typedef unspecified type; }; // public member functions template<typename Expr> unspecified operator()(Expr const &) const; };
Generators are intended for use as the first template parameter to the proto::domain<> class template and control if and how expressions within that domain are to be customized. proto::by_value_generator ensures all child nodes are held by value. This generator is typically composed with a second generator for further processing, as proto::compose_generators<proto::by_value_generator, MyGenerator>.
template<typename Expr> unspecified operator()(Expr const & expr) const;
| Parameters: |
|
||
| Returns: | Equivalent to proto::deep_copy(expr) |