| Home | Libraries | People | FAQ | More

## Struct template child_c

boost::proto::result_of::child_c — A metafunction that returns the type of the `N`th child of a Proto expression.

## Synopsis

    // In header: <boost/proto/traits.hpp>

    template<typename Expr, long N>
    struct child_c {
      // types
      typedef typename Expr::proto_child0 value_type;
      typedef see-below type;
    };

## Description

A metafunction that returns the type of the `N`th child of a Proto expression. `N` must be 0 or less than `Expr::proto_arity::value`.

### `child_c` public types

1. typedef typename Expr::proto_child0 value_type;

   The raw type of the `N`th child as it is stored within `Expr`. This may be a value or a reference.

2. typedef `see-below` type;

   If `Expr` is not a reference type, `type` is computed as follows:

   - `T const &` becomes `T`

   - `T &` becomes `T`

   - `T` becomes `T`

   If `Expr` is a non-const reference type, `type` is computed as follows:

   - `T const &` becomes `T const &`

   - `T &` becomes `T &`

   - `T` becomes `T &`

   If `Expr` is a const reference type, `type` is computed as follows:

   - `T const &` becomes `T const &`

   - `T &` becomes `T &`

   - `T` becomes `T const &`