...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::proto::extends — For adding behaviors to a Proto expression template.
// In header: <boost/proto/extends.hpp> template<typename Expr, typename Derived, typename Domain = proto::default_domain> struct extends { // types typedef typename Expr::proto_base_expr proto_base_expr; typedef Domain proto_domain; typedef Derived proto_derived_expr; typedef typename proto_base_expr::proto_tag proto_tag; typedef typename proto_base_expr::proto_args proto_args; typedef typename proto_base_expr::proto_arity proto_arity; typedef typename proto_base_expr::proto_childN
proto_childN; // For eachN
in[0,max(1,proto_arity::value))
template<typename Signature> struct result { // types typedefunspecified
type; }; // construct/copy/destruct extends(); extends(extends const &); extends(Expr const &); // public static functions static Derived const make(Expr const &); // public member functions proto_base_expr & proto_base(); proto_base_expr const & proto_base() const; template<typename A>unspecified
operator=(A &); template<typename A>unspecified
operator=(A const &); template<typename A>unspecified
operator=(A &) const; template<typename A>unspecified
operator=(A const &) const; template<typename A>unspecified
operator[](A &); template<typename A>unspecified
operator[](A const &); template<typename A>unspecified
operator[](A &) const; template<typename A>unspecified
operator[](A const &) const; template<typename... A>unspecified
operator()(A const &...); template<typename... A>unspecified
operator()(A const &...) const; Expr proto_expr_; };
extends
public
construct/copy/destructextends();
extends(extends const & that);
extends(Expr const & expr_);
extends
public member functionsproto_base_expr & proto_base();
Returns: |
proto_expr_.proto_base() |
Throws: |
Will not throw. |
proto_base_expr const & proto_base() const;
Returns: |
proto_expr_.proto_base() |
Throws: |
Will not throw. |
template<typename A> unspecified
operator=(A & a);
Lazy assignment expression
Returns: |
A new expression node representing the assignment operation. |
template<typename A> unspecified
operator=(A const & a);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A> unspecified
operator=(A & a) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A> unspecified
operator=(A const & a) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A> unspecified
operator[](A & a);
Lazy subscript expression
Returns: |
A new expression node representing the subscript operation. |
template<typename A> unspecified
operator[](A const & a);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A> unspecified
operator[](A & a) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename A> unspecified
operator[](A const & a) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename... A> unspecified
operator()(A const &... a);
Lazy function call
Returns: |
A new expression node representing the function call operation. |
template<typename... A> unspecified
operator()(A const &... a) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.