1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright 2012 Eric Niebler
4
5  Distributed under the Boost
6  Software License, Version 1.0. (See accompanying
7  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8  -->
9<header name="boost/proto/repeat.hpp">
10  <para>
11    Contains macros to ease the generation of repetitious code constructs.
12  </para>
13
14  <macro name="BOOST_PROTO_REPEAT" kind="functionlike">
15    <macro-parameter name="MACRO"/>
16    <purpose>Repeatedly invoke the specified macro.</purpose>
17    <description>
18      <para>
19        <computeroutput>BOOST_PROTO_REPEAT()</computeroutput> is used to generate the kind of repetitive
20        code that is typical of EDSLs built with Proto.
21        <computeroutput>BOOST_PROTO_REPEAT(<replaceable>MACRO</replaceable>)</computeroutput>
22        is equivalent to:
23      </para>
24      <para>
25        <programlisting><replaceable>MACRO</replaceable>(1, <macroname>BOOST_PROTO_typename_A</macroname>, <macroname>BOOST_PROTO_A_const_ref</macroname>, <macroname>BOOST_PROTO_A_const_ref_a</macroname>, <macroname>BOOST_PROTO_ref_a</macroname>)
26<replaceable>MACRO</replaceable>(2, <macroname>BOOST_PROTO_typename_A</macroname>, <macroname>BOOST_PROTO_A_const_ref</macroname>, <macroname>BOOST_PROTO_A_const_ref_a</macroname>, <macroname>BOOST_PROTO_ref_a</macroname>)
27...
28<replaceable>MACRO</replaceable>(<macroname>BOOST_PROTO_MAX_ARITY</macroname>, <macroname>BOOST_PROTO_typename_A</macroname>, <macroname>BOOST_PROTO_A_const_ref</macroname>, <macroname>BOOST_PROTO_A_const_ref_a</macroname>, <macroname>BOOST_PROTO_ref_a</macroname>)</programlisting>
29      </para>
30      <para>
31        <emphasis role="bold">Example:</emphasis>
32      </para>
33      <para>
34        See <computeroutput><macroname>BOOST_PROTO_REPEAT_FROM_TO</macroname>()</computeroutput>.
35      </para>
36    </description>
37  </macro>
38
39  <macro name="BOOST_PROTO_REPEAT_FROM_TO" kind="functionlike">
40    <macro-parameter name="FROM"/>
41    <macro-parameter name="TO"/>
42    <macro-parameter name="MACRO"/>
43    <purpose>Repeatedly invoke the specified macro.</purpose>
44    <description>
45      <para>
46        <computeroutput>BOOST_PROTO_REPEAT_FROM_TO()</computeroutput> is used to generate the kind of repetitive
47        code that is typical of EDSLs built with Proto.
48        <computeroutput>BOOST_PROTO_REPEAT_FROM_TO(<replaceable>FROM</replaceable>, <replaceable>TO</replaceable>, <replaceable>MACRO</replaceable>)</computeroutput>
49        is equivalent to:
50      </para>
51      <para>
52        <programlisting><replaceable>MACRO</replaceable>(<replaceable>FROM</replaceable>, <macroname>BOOST_PROTO_typename_A</macroname>, <macroname>BOOST_PROTO_A_const_ref</macroname>, <macroname>BOOST_PROTO_A_const_ref_a</macroname>, <macroname>BOOST_PROTO_ref_a</macroname>)
53<replaceable>MACRO</replaceable>(<replaceable>FROM+1</replaceable>, <macroname>BOOST_PROTO_typename_A</macroname>, <macroname>BOOST_PROTO_A_const_ref</macroname>, <macroname>BOOST_PROTO_A_const_ref_a</macroname>, <macroname>BOOST_PROTO_ref_a</macroname>)
54...
55<replaceable>MACRO</replaceable>(<replaceable>TO-1</replaceable>, <macroname>BOOST_PROTO_typename_A</macroname>, <macroname>BOOST_PROTO_A_const_ref</macroname>, <macroname>BOOST_PROTO_A_const_ref_a</macroname>, <macroname>BOOST_PROTO_ref_a</macroname>)</programlisting>
56      </para>
57      <para>
58        <emphasis role="bold">Example:</emphasis>
59      </para>
60      <para>
61        <programlisting>// Generate BOOST_PROTO_MAX_ARITY-1 overloads of the
62// following construct() function template.
63#define M0(N, typename_A, A_const_ref, A_const_ref_a, ref_a)      \
64template&lt;typename T, typename_A(N)&gt;                               \
65typename <classname alt="boost::proto::result_of::make_expr">proto::result_of::make_expr</classname>&lt;                             \
66    <classname alt="boost::proto::tag::function">proto::tag::function</classname>                                          \
67  , construct_helper&lt;T&gt;                                           \
68  , A_const_ref(N)                                                \
69>::type const                                                     \
70construct(A_const_ref_a(N))                                       \
71{                                                                 \
72    return <functionname alt="boost::proto::make_expr">proto::make_expr</functionname>&lt;                                      \
73        <classname alt="boost::proto::tag::function">proto::tag::function</classname>                                      \
74    &gt;(                                                            \
75        construct_helper&lt;T&gt;()                                     \
76      , ref_a(N)                                                  \
77    );                                                            \
78}
79BOOST_PROTO_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, M0)
80#undef M0</programlisting>
81      </para>
82      <para>
83        The above invocation of <computeroutput>BOOST_PROTO_REPEAT_FROM_TO()</computeroutput>
84        will generate the following code:
85      </para>
86      <para>
87        <programlisting>template&lt;typename T, typename A0&gt;
88typename <classname alt="boost::proto::result_of::make_expr">proto::result_of::make_expr</classname>&lt;
89    <classname alt="boost::proto::tag::function">proto::tag::function</classname>
90  , construct_helper&lt;T&gt;
91  , A0 const &amp;
92&gt;::type const
93construct(A0 const &amp; a0)
94{
95    return <functionname alt="boost::proto::make_expr">proto::make_expr</functionname>&lt;
96        <classname alt="boost::proto::tag::function">proto::tag::function</classname>
97    &gt;(
98        construct_helper&lt;T&gt;()
99      , boost::ref(a0)
100    );
101}
102
103template&lt;typename T, typename A0, typename A1&gt;
104typename <classname alt="boost::proto::result_of::make_expr">proto::result_of::make_expr</classname>&lt;
105    <classname alt="boost::proto::tag::function">proto::tag::function</classname>
106  , construct_helper&lt;T&gt;
107  , A0 const &amp;
108  , A1 const &amp;
109&gt;::type const
110construct(A0 const &amp; a0, A1 const &amp; a1)
111{
112    return <functionname alt="boost::proto::make_expr">proto::make_expr</functionname>&lt;
113        <classname alt="boost::proto::tag::function">proto::tag::function</classname>
114    &gt;(
115        construct_helper&lt;T&gt;()
116      , boost::ref(a0)
117      , boost::ref(a1)
118    );
119}
120
121// ... and so on, up to BOOST_PROTO_MAX_ARITY-1 arguments ...</programlisting>
122      </para>
123    </description>
124  </macro>
125
126  <macro name="BOOST_PROTO_REPEAT_EX" kind="functionlike">
127    <macro-parameter name="MACRO"/>
128    <macro-parameter name="typename_A"/>
129    <macro-parameter name="A"/>
130    <macro-parameter name="A_a"/>
131    <macro-parameter name="a"/>
132    <purpose>Repeatedly invoke the specified macro.</purpose>
133    <description>
134      <para>
135        <computeroutput>BOOST_PROTO_REPEAT_EX()</computeroutput> is used to generate the kind of repetitive
136        code that is typical of EDSLs built with Proto.
137        <computeroutput>BOOST_PROTO_REPEAT_EX(<replaceable>MACRO</replaceable>, <replaceable>typename_A</replaceable>, <replaceable>A</replaceable>, <replaceable>A_a</replaceable>, <replaceable>a</replaceable>)</computeroutput>
138        is equivalent to:
139      </para>
140      <para>
141        <programlisting><replaceable>MACRO</replaceable>(1, typename_A, A, A_a, a)
142<replaceable>MACRO</replaceable>(2, typename_A, A, A_a, a)
143...
144<replaceable>MACRO</replaceable>(<macroname>BOOST_PROTO_MAX_ARITY</macroname>, typename_A, A, A_a, a)</programlisting>
145      </para>
146      <para>
147        <emphasis role="bold">Example:</emphasis>
148      </para>
149      <para>
150        See <computeroutput><macroname>BOOST_PROTO_REPEAT_FROM_TO</macroname>()</computeroutput>.
151      </para>
152    </description>
153  </macro>
154
155  <macro name="BOOST_PROTO_REPEAT_FROM_TO_EX" kind="functionlike">
156    <macro-parameter name="FROM"/>
157    <macro-parameter name="TO"/>
158    <macro-parameter name="MACRO"/>
159    <macro-parameter name="typename_A"/>
160    <macro-parameter name="A"/>
161    <macro-parameter name="A_a"/>
162    <macro-parameter name="a"/>
163    <purpose>Repeatedly invoke the specified macro.</purpose>
164    <description>
165      <para>
166        <computeroutput>BOOST_PROTO_REPEAT_FROM_TO_EX()</computeroutput> is used to generate the kind of repetitive
167        code that is typical of EDSLs built with Proto.
168        <computeroutput>BOOST_PROTO_REPEAT_FROM_TO_EX(<replaceable>FROM</replaceable>, <replaceable>TO</replaceable>, <replaceable>MACRO</replaceable>, <replaceable>typename_A</replaceable>, <replaceable>A</replaceable>, <replaceable>A_a</replaceable>, <replaceable>a</replaceable>)</computeroutput>
169        is equivalent to:
170      </para>
171      <para>
172        <programlisting><replaceable>MACRO</replaceable>(<replaceable>FROM</replaceable>, typename_A, A, A_a, a)
173<replaceable>MACRO</replaceable>(<replaceable>FROM+1</replaceable>, typename_A, A, A_a, a)
174...
175<replaceable>MACRO</replaceable>(<replaceable>TO-1</replaceable>, typename_A, A, A_a, a)</programlisting>
176      </para>
177      <para>
178        <emphasis role="bold">Example:</emphasis>
179      </para>
180      <para>
181        See <computeroutput><macroname>BOOST_PROTO_REPEAT_FROM_TO</macroname>()</computeroutput>.
182      </para>
183    </description>
184  </macro>
185
186  <macro name="BOOST_PROTO_LOCAL_ITERATE" kind="functionlike">
187    <purpose>Vertical repetition of a user-supplied macro.</purpose>
188    <description>
189      <para>
190        <computeroutput>BOOST_PROTO_LOCAL_ITERATE()</computeroutput> is used generate the kind of repetitive code that is typical
191        of EDSLs built with Proto. This macro causes the user-defined macro <computeroutput>BOOST_PROTO_LOCAL_MACRO()</computeroutput> to
192        be expanded with values in the range specified by <computeroutput>BOOST_PROTO_LOCAL_LIMITS</computeroutput>.
193      </para>
194      <para>
195        <emphasis role="bold">Usage:</emphasis>
196      </para>
197      <para>
198        <programlisting>#include BOOST_PROTO_LOCAL_ITERATE()</programlisting>
199      </para>
200      <para>
201        <emphasis role="bold">Example:</emphasis>
202      </para>
203      <para>
204        <programlisting>// Generate BOOST_PROTO_MAX_ARITY-1 overloads of the
205// following construct() function template.
206#define BOOST_PROTO_LOCAL_MACRO(N, typename_A, A_const_ref, A_const_ref_a, ref_a)\
207template&lt;typename T, typename_A(N)&gt;                               \
208typename <classname alt="boost::proto::result_of::make_expr">proto::result_of::make_expr</classname>&lt;                             \
209    <classname alt="boost::proto::tag::function">proto::tag::function</classname>                                          \
210  , construct_helper&lt;T&gt;                                           \
211  , A_const_ref(N)                                                \
212>::type const                                                     \
213construct(A_const_ref_a(N))                                       \
214{                                                                 \
215    return <functionname alt="boost::proto::make_expr">proto::make_expr</functionname>&lt;                                      \
216        <classname alt="boost::proto::tag::function">proto::tag::function</classname>                                      \
217    &gt;(                                                            \
218        construct_helper&lt;T&gt;()                                     \
219      , ref_a(N)                                                  \
220    );                                                            \
221}
222#define BOOST_PROTO_LOCAL_LIMITS (1, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY))
223#include BOOST_PROTO_LOCAL_ITERATE()</programlisting>
224      </para>
225      <para>
226        The above inclusion of <computeroutput>BOOST_PROTO_LOCAL_ITERATE()</computeroutput>
227        will generate the following code:
228      </para>
229      <para>
230        <programlisting>template&lt;typename T, typename A0&gt;
231typename <classname alt="boost::proto::result_of::make_expr">proto::result_of::make_expr</classname>&lt;
232    <classname alt="boost::proto::tag::function">proto::tag::function</classname>
233  , construct_helper&lt;T&gt;
234  , A0 const &amp;
235&gt;::type const
236construct(A0 const &amp; a0)
237{
238    return <functionname alt="boost::proto::make_expr">proto::make_expr</functionname>&lt;
239        <classname alt="boost::proto::tag::function">proto::tag::function</classname>
240    &gt;(
241        construct_helper&lt;T&gt;()
242      , boost::ref(a0)
243    );
244}
245
246template&lt;typename T, typename A0, typename A1&gt;
247typename <classname alt="boost::proto::result_of::make_expr">proto::result_of::make_expr</classname>&lt;
248    <classname alt="boost::proto::tag::function">proto::tag::function</classname>
249  , construct_helper&lt;T&gt;
250  , A0 const &amp;
251  , A1 const &amp;
252&gt;::type const
253construct(A0 const &amp; a0, A1 const &amp; a1)
254{
255    return <functionname alt="boost::proto::make_expr">proto::make_expr</functionname>&lt;
256        <classname alt="boost::proto::tag::function">proto::tag::function</classname>
257    &gt;(
258        construct_helper&lt;T&gt;()
259      , boost::ref(a0)
260      , boost::ref(a1)
261    );
262}
263
264// ... and so on, up to BOOST_PROTO_MAX_ARITY-1 arguments ...</programlisting>
265      </para>
266      <para>
267        If <computeroutput>BOOST_PROTO_LOCAL_LIMITS</computeroutput> is not defined by the user, it defaults
268        to <computeroutput>(1, BOOST_PROTO_MAX_ARITY)</computeroutput>.
269      </para>
270      <para>
271        At each iteration, <computeroutput>BOOST_PROTO_LOCAL_MACRO()</computeroutput> is invoked with the current
272        iteration number and the following 4 macro parameters:
273        <itemizedlist>
274          <listitem><computeroutput>BOOST_PROTO_LOCAL_typename_A</computeroutput></listitem>
275          <listitem><computeroutput>BOOST_PROTO_LOCAL_A</computeroutput></listitem>
276          <listitem><computeroutput>BOOST_PROTO_LOCAL_A_a</computeroutput></listitem>
277          <listitem><computeroutput>BOOST_PROTO_LOCAL_a</computeroutput></listitem>
278        </itemizedlist>
279        If these macros are not defined by the user, they default respectively to:
280        <itemizedlist>
281          <listitem><computeroutput><macroname>BOOST_PROTO_typename_A</macroname></computeroutput></listitem>
282          <listitem><computeroutput><macroname>BOOST_PROTO_A_const_ref</macroname></computeroutput></listitem>
283          <listitem><computeroutput><macroname>BOOST_PROTO_A_const_ref_a</macroname></computeroutput></listitem>
284          <listitem><computeroutput><macroname>BOOST_PROTO_ref_a</macroname></computeroutput></listitem>
285        </itemizedlist>
286      </para>
287      <para>
288        After including <computeroutput>BOOST_PROTO_LOCAL_ITERATE()</computeroutput>, the
289        following macros are automatically undefined:
290        <itemizedlist>
291          <listitem><computeroutput>BOOST_PROTO_LOCAL_MACRO</computeroutput></listitem>
292          <listitem><computeroutput>BOOST_PROTO_LOCAL_LIMITS</computeroutput></listitem>
293          <listitem><computeroutput>BOOST_PROTO_LOCAL_typename_A</computeroutput></listitem>
294          <listitem><computeroutput>BOOST_PROTO_LOCAL_A</computeroutput></listitem>
295          <listitem><computeroutput>BOOST_PROTO_LOCAL_A_a</computeroutput></listitem>
296          <listitem><computeroutput>BOOST_PROTO_LOCAL_a</computeroutput></listitem>
297        </itemizedlist>
298      </para>
299    </description>
300  </macro>
301
302  <macro name="BOOST_PROTO_typename_A" kind="functionlike">
303    <macro-parameter name="N"/>
304    <purpose>
305      Generates sequences like
306      <computeroutput>
307        typename A<subscript>0</subscript>,
308        typename A<subscript>1</subscript>, …
309        typename A<subscript>N-1</subscript>
310      </computeroutput>.
311    </purpose>
312    <description>
313      <para>
314        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
315        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
316      </para>
317      <para>
318        <computeroutput>BOOST_PROTO_typename_A(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
319      </para>
320      <para>
321        <programlisting>typename A<subscript>0</subscript>, typename A<subscript>1</subscript>, … typename A<subscript>N-1</subscript></programlisting>
322      </para>
323    </description>
324  </macro>
325
326  <macro name="BOOST_PROTO_A_const_ref" kind="functionlike">
327    <macro-parameter name="N"/>
328    <purpose>
329      Generates sequences like
330      <computeroutput>
331        A<subscript>0</subscript> const &amp;,
332        A<subscript>1</subscript> const &amp;, …
333        A<subscript>N-1</subscript> const &amp;
334      </computeroutput>.
335    </purpose>
336    <description>
337      <para>
338        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
339        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
340      </para>
341      <para>
342        <computeroutput>BOOST_PROTO_A_const_ref(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
343      </para>
344      <para>
345        <programlisting>A<subscript>0</subscript> const &amp;, A<subscript>1</subscript> const &amp;, … A<subscript>N-1</subscript> const &amp;</programlisting>
346      </para>
347    </description>
348  </macro>
349
350  <macro name="BOOST_PROTO_A_ref" kind="functionlike">
351    <macro-parameter name="N"/>
352    <purpose>
353      Generates sequences like
354      <computeroutput>
355        A<subscript>0</subscript> &amp;,
356        A<subscript>1</subscript> &amp;, …
357        A<subscript>N-1</subscript> &amp;
358      </computeroutput>.
359    </purpose>
360    <description>
361      <para>
362        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
363        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
364      </para>
365      <para>
366        <computeroutput>BOOST_PROTO_A_ref(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
367      </para>
368      <para>
369        <programlisting>A<subscript>0</subscript> &amp;, A<subscript>1</subscript> &amp;, … A<subscript>N-1</subscript> &amp;</programlisting>
370      </para>
371    </description>
372  </macro>
373
374  <macro name="BOOST_PROTO_A" kind="functionlike">
375    <macro-parameter name="N"/>
376    <purpose>
377      Generates sequences like
378      <computeroutput>
379        A<subscript>0</subscript>,
380        A<subscript>1</subscript>, …
381        A<subscript>N-1</subscript>
382      </computeroutput>.
383    </purpose>
384    <description>
385      <para>
386        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
387        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
388      </para>
389      <para>
390        <computeroutput>BOOST_PROTO_A(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
391      </para>
392      <para>
393        <programlisting>A<subscript>0</subscript>, A<subscript>1</subscript>, … A<subscript>N-1</subscript></programlisting>
394      </para>
395    </description>
396  </macro>
397
398  <macro name="BOOST_PROTO_A_const" kind="functionlike">
399    <macro-parameter name="N"/>
400    <purpose>
401      Generates sequences like
402      <computeroutput>
403        A<subscript>0</subscript> const,
404        A<subscript>1</subscript> const, …
405        A<subscript>N-1</subscript> const
406      </computeroutput>.
407    </purpose>
408    <description>
409      <para>
410        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
411        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
412      </para>
413      <para>
414        <computeroutput>BOOST_PROTO_A_const(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
415      </para>
416      <para>
417        <programlisting>A<subscript>0</subscript> const, A<subscript>1</subscript> const, … A<subscript>N-1</subscript> const</programlisting>
418      </para>
419    </description>
420  </macro>
421
422  <macro name="BOOST_PROTO_A_const_ref_a" kind="functionlike">
423    <macro-parameter name="N"/>
424    <purpose>
425      Generates sequences like
426      <computeroutput>
427        A<subscript>0</subscript> const &amp; a<subscript>0</subscript>,
428        A<subscript>1</subscript> const &amp; a<subscript>1</subscript>, …
429        A<subscript>N-1</subscript> const &amp; a<subscript>N-1</subscript>
430      </computeroutput>.
431    </purpose>
432    <description>
433      <para>
434        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
435        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
436      </para>
437      <para>
438        <computeroutput>BOOST_PROTO_A_const_ref_a(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
439      </para>
440      <para>
441        <programlisting>A<subscript>0</subscript> const &amp; a<subscript>0</subscript>, A<subscript>1</subscript> const &amp; a<subscript>1</subscript>, … A<subscript>N-1</subscript> const &amp; a<subscript>N-1</subscript></programlisting>
442      </para>
443    </description>
444  </macro>
445
446  <macro name="BOOST_PROTO_A_ref_a" kind="functionlike">
447    <macro-parameter name="N"/>
448    <purpose>
449      Generates sequences like
450      <computeroutput>
451        A<subscript>0</subscript> &amp; a<subscript>0</subscript>,
452        A<subscript>1</subscript> &amp; a<subscript>1</subscript>, …
453        A<subscript>N-1</subscript> &amp; a<subscript>N-1</subscript>
454      </computeroutput>.
455    </purpose>
456    <description>
457      <para>
458        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
459        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
460      </para>
461      <para>
462        <computeroutput>BOOST_PROTO_A_ref_a(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
463      </para>
464      <para>
465        <programlisting>A<subscript>0</subscript> &amp; a<subscript>0</subscript>, A<subscript>1</subscript> &amp; a<subscript>1</subscript>, … A<subscript>N-1</subscript> &amp; a<subscript>N-1</subscript></programlisting>
466      </para>
467    </description>
468  </macro>
469
470  <macro name="BOOST_PROTO_ref_a" kind="functionlike">
471    <macro-parameter name="N"/>
472    <purpose>
473      Generates sequences like
474      <computeroutput>
475        boost::ref(a<subscript>0</subscript>),
476        boost::ref(a<subscript>1</subscript>), …
477        boost::ref(a<subscript>N-1</subscript>)
478      </computeroutput>.
479    </purpose>
480    <description>
481      <para>
482        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
483        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
484      </para>
485      <para>
486        <computeroutput>BOOST_PROTO_ref_a(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
487      </para>
488      <para>
489        <programlisting>boost::ref(a<subscript>0</subscript>), boost::ref(a<subscript>1</subscript>), … boost::ref(a<subscript>N-1</subscript>)</programlisting>
490      </para>
491    </description>
492  </macro>
493
494  <macro name="BOOST_PROTO_a" kind="functionlike">
495    <macro-parameter name="N"/>
496    <purpose>
497      Generates sequences like
498      <computeroutput>
499        a<subscript>0</subscript>,
500        a<subscript>1</subscript>, …
501        a<subscript>N-1</subscript>
502      </computeroutput>.
503    </purpose>
504    <description>
505      <para>
506        Intended for use with the <computeroutput><macroname>BOOST_PROTO_REPEAT</macroname>()</computeroutput>
507        and <computeroutput><macroname>BOOST_PROTO_LOCAL_ITERATE</macroname>()</computeroutput> macros.
508      </para>
509      <para>
510        <computeroutput>BOOST_PROTO_a(<replaceable>N</replaceable>)</computeroutput> generates sequences like:
511      </para>
512      <para>
513        <programlisting>a<subscript>0</subscript>, a<subscript>1</subscript>, … a<subscript>N-1</subscript></programlisting>
514      </para>
515    </description>
516  </macro>
517
518</header>
519