Struct template extends

| Home | Libraries | People | FAQ | More

## Struct template extends

boost::proto::extends — For adding behaviors to a Proto expression template.

## Synopsis

    // 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 each N in [0,max(1,proto_arity::value))
      template<typename Signature>
      struct result {
        // types
        typedef unspecified 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_;
    };

## Description

### `extends` public construct/copy/destruct

1.     extends();

2.     extends(extends const & that);

3.     extends(Expr const & expr_);

### `extends` public static functions

1.     static Derived const make(Expr const & expr);

### `extends` public member functions

1.     proto_base_expr & proto_base();

   Returns: | `proto_expr_.proto_base()`
   Throws: | Will not throw.

2.     proto_base_expr const & proto_base() const;

   Returns: | `proto_expr_.proto_base()`
   Throws: | Will not throw.

3.     template<typename A> unspecified operator=(A & a);

   Lazy assignment expression

   Returns: | A new expression node representing the assignment operation.

4.     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.

5.     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.

6.     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.

7.     template<typename A> unspecified operator[](A & a);

   Lazy subscript expression

   Returns: | A new expression node representing the subscript operation.

8.     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.

9.     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.

10.     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.

11.     template<typename... A> unspecified operator()(A const &... a);

    Lazy function call

    Returns: | A new expression node representing the function call operation.

12.     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.