The above macro generates the necessary code to adapt type_name
or an arbitrary specialization of type_name
as a model of Random
Access Sequence. The sequence (template_param0)(template_param1)...
declares the names of the template type parameters used. The sequence (specialization_param0)(specialization_param1)... declares the template parameters of the
actual specialization of type_name
that is adapted as a fusion sequence. The sequence of (attribute_typeN,
attribute_const_typeN, get_exprN,
set_exprN) quadruples declares the types,
const types, get-expressions and set-expressions of the elements that are
part of the adapted fusion sequence. get_exprN
is the expression that is invoked to get the Nth element
of an instance of type_name.
This expression may access a variable named obj
of type type_name&
or type_nameconst& which represents the underlying instance
of type_name. attribute_typeN
and attribute_const_typeN may specify
the types that get_exprN denotes
to. set_exprN is the expression that
is invoked to set the Nth element of an instance of
type_name. This expression
may access variables named obj
of type type_name&,
which represent the corresponding instance of type_name,
and val of an arbitrary const-qualified
reference template type parameter Val,
which represents the right operand of the assignment expression.

The actual return type of fusion's intrinsic sequence access (meta-)functions
when in invoked with (an instance of) type_name
is a proxy type. This type is implicitly convertible to the attribute type
via get_exprN and forwards assignment
to the underlying element via set_exprN.
The value type (that is the type returned by result_of::value_of, result_of::value_at and result_of::value_at_c) of the Nth
element is attribute_typeN with const-qualifier
and reference removed.

The macro should be used at global scope, and type_name
should be the fully namespace qualified name of the template class type to
be adapted.