![]() |
Home | Libraries | People | FAQ | More |
boost::proto::functional::child — A callable PolymorphicFunctionObject that is equivalent to the proto::child() function.
// In header: <boost/proto/traits.hpp> template<typename N = mpl::long_<0> > struct child : proto::callable { template<typename This, typename Expr> struct result<This(Expr)> : proto::result_of::child< Expr, N > { }; // public member functions template<typename Expr> typename proto::result_of::child< Expr &, N >::type operator()(Expr &) const; template<typename Expr> typename proto::result_of::child< Expr const &, N >::type operator()(Expr const &) const; };
A callable PolymorphicFunctionObject that is equivalent to the proto::child() function. N is required to be an MPL Integral Constant.
template<typename Expr> typename proto::result_of::child< Expr &, N >::type operator()(Expr & expr) const;
Return the Nth child of the given expression.
| Parameters: |
|
||
| Requires: |
proto::is_expr<Expr>::value is true N::value < Expr::proto_arity::value |
||
| Returns: | proto::child<N>(expr) |
||
| Throws: | Will not throw. |
template<typename Expr> typename proto::result_of::child< Expr const &, N >::type operator()(Expr const & expr) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.