1<html> 2<head> 3 <title>BOOST_PP_LIST_ENUM_R</title> 4 <link rel="stylesheet" type="text/css" href="../styles.css"> 5</head> 6<body> 7 <div style="margin-left: 0px;"> 8 The <b>BOOST_PP_LIST_ENUM_R</b> macro converts a <i>list</i> to a comma-separated list. 9 It reenters <b>BOOST_PP_FOR</b> with maximum efficiency. 10 </div> 11 <h4>Usage</h4> 12 <div class="code"> 13 <b>BOOST_PP_LIST_ENUM_R</b>(<i>r</i>, <i>list</i>) 14 </div> 15 <h4>Arguments</h4> 16 <dl> 17 <dt>r</dt> 18 <dd> 19 The next available <b>BOOST_PP_FOR</b> repetition. 20 </dd> 21 <dt>list</dt> 22 <dd> 23 The <i>list</i> to be converted. 24 </dd> 25 </dl> 26 <h4>Remarks</h4> 27 <div> 28 If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))), 29 this macro will produce: 30 <div> 31 <i>a</i>, <i>b</i>, <i>c</i> 32 </div> 33 </div> 34 <h4>See Also</h4> 35 <ul> 36 <li><a href="list_enum.html">BOOST_PP_LIST_ENUM</a></li> 37 </ul> 38 <h4>Requirements</h4> 39 <div> 40 <b>Header:</b> <a href="../headers/list/enum.html"><boost/preprocessor/list/enum.hpp></a> 41 </div> 42 <h4>Sample Code</h4> 43<div><pre> 44#include <<a href="../headers/list/adt.html">boost/preprocessor/list/adt.hpp</a>> 45#include <<a href="../headers/repetition/for.html">boost/preprocessor/repetition/for.hpp</a>> 46#include <<a href="../headers/list/enum.html">boost/preprocessor/list/enum.hpp</a>> 47 48#define LIST (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))) 49 50#define PRED(r, state) <a href="list_is_cons.html">BOOST_PP_LIST_IS_CONS</a>(state) 51#define OP(r, state) <a href="list_rest.html">BOOST_PP_LIST_REST</a>(state) 52#define MACRO(r, state) [ <a href="list_enum_r.html">BOOST_PP_LIST_ENUM_R</a>(r, state) ] 53 54<a href="for.html">BOOST_PP_FOR</a>(LIST, PRED, OP, MACRO) 55 // expands to [x, y, z] [y, z] [z] 56</pre></div> 57 <hr size="1"> 58 <div style="margin-left: 0px;"> 59 <i>� Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i> 60 </br><i>� Copyright Paul Mensonides 2002</i> 61 </div> 62 <div style="margin-left: 0px;"> 63 <p><small>Distributed under the Boost Software License, Version 1.0. (See 64 accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or 65 copy at <a href= 66 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> 67 </div> 68</body> 69</html> 70