BOOST_FUSION_ADAPT_ADT is a macro than can be used to generate all the necessary
boilerplate to adapt an arbitrary class type as a model of <aclass="link"href="../sequence/concepts/random_access_sequence.html"title="Random Access Sequence">Random
set_expr<spanclass="emphasis"><em>N</em></span>)</code> quadruples declares the types,
const types, get-expressions and set-expressions of the elements that are
part of the adapted fusion sequence. <codeclass="literal">get_expr<spanclass="emphasis"><em>N</em></span></code>
is the expression that is invoked to get the <spanclass="emphasis"><em>N</em></span>th element
of an instance of <codeclass="computeroutput"><spanclass="identifier">type_name</span></code>.
This expression may access a variable named <codeclass="computeroutput"><spanclass="identifier">obj</span></code>
of type <codeclass="computeroutput"><spanclass="identifier">type_name</span><spanclass="special">&</span></code>
or <codeclass="computeroutput"><spanclass="identifier">type_name</span><spanclass="keyword">const</span><spanclass="special">&</span></code> which represents the underlying instance
of <codeclass="computeroutput"><spanclass="identifier">type_name</span></code>. <codeclass="literal">attribute_type<spanclass="emphasis"><em>N</em></span></code>
and <codeclass="literal">attribute_const_type<spanclass="emphasis"><em>N</em></span></code> may specify
the types that <codeclass="literal">get_expr<spanclass="emphasis"><em>N</em></span></code> denotes
to. <codeclass="literal">set_expr<spanclass="emphasis"><em>N</em></span></code> is the expression that
is invoked to set the <spanclass="emphasis"><em>N</em></span>th element of an instance of
<codeclass="computeroutput"><spanclass="identifier">type_name</span></code>. This expression
may access variables named <codeclass="computeroutput"><spanclass="identifier">obj</span></code>
of type <codeclass="computeroutput"><spanclass="identifier">type_name</span><spanclass="special">&</span></code>,
which represent the corresponding instance of <codeclass="computeroutput"><spanclass="identifier">type_name</span></code>,
and <codeclass="computeroutput"><spanclass="identifier">val</span></code> of an arbitrary const-qualified
reference template type parameter <codeclass="computeroutput"><spanclass="identifier">Val</span></code>,
which represents the right operand of the assignment expression.
</p>
<p>
The actual return type of fusion's intrinsic sequence access (meta-)functions
when in invoked with (an instance of) <codeclass="computeroutput"><spanclass="identifier">type_name</span></code>
is a proxy type. This type is implicitly convertible to the attribute type
via <codeclass="literal">get_expr<spanclass="emphasis"><em>N</em></span></code> and forwards assignment
to the underlying element via <codeclass="literal">set_expr<spanclass="emphasis"><em>N</em></span></code>.
The value type (that is the type returned by <aclass="link"href="../iterator/metafunctions/value_of.html"title="value_of"><codeclass="computeroutput"><spanclass="identifier">result_of</span><spanclass="special">::</span><spanclass="identifier">value_of</span></code></a>, <aclass="link"href="../sequence/intrinsic/metafunctions/value_at.html"title="value_at"><codeclass="computeroutput"><spanclass="identifier">result_of</span><spanclass="special">::</span><spanclass="identifier">value_at</span></code></a> and <aclass="link"href="../sequence/intrinsic/metafunctions/value_at_c.html"title="value_at_c"><codeclass="computeroutput"><spanclass="identifier">result_of</span><spanclass="special">::</span><spanclass="identifier">value_at_c</span></code></a>) of the <spanclass="emphasis"><em>N</em></span>th
element is <codeclass="literal">attribute_type<spanclass="emphasis"><em>N</em></span></code> with const-qualifier
<spanclass="comment">//Prints 'Edward Norton is 41 years old'
</span><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">cout</span><spanclass="special"><<</span><spanclass="identifier">e</span><spanclass="special">.</span><spanclass="identifier">get_name</span><spanclass="special">()</span><spanclass="special"><<</span><spanclass="string">" is "</span><spanclass="special"><<</span><spanclass="identifier">e</span><spanclass="special">.</span><spanclass="identifier">get_age</span><spanclass="special">()</span><spanclass="special"><<</span><spanclass="string">"years old"</span><spanclass="special"><<</span><spanclass="identifier">std</span><spanclass="special">::</span><spanclass="identifier">endl</span><spanclass="special">;</span>