1<html> 2<head> 3 <title>BOOST_PP_LOCAL_ITERATE</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_LOCAL_ITERATE</b> macro initiates a <i>local-iteration</i>. 9 </div> 10 <h4>Usage</h4> 11 <div class="code"> 12 #include <b>BOOST_PP_LOCAL_ITERATE</b>() 13 </div> 14 <h4>Remarks</h4> 15 <div> 16 This macro causes the user-defined macro <b>BOOST_PP_LOCAL_MACRO</b> to be expanded vertically with values in the range specified by <b>BOOST_PP_LOCAL_LIMITS</b>. 17 </div> 18 <h4>See Also</h4> 19 <ul> 20 <li><a href="local_limits.html">BOOST_PP_LOCAL_LIMITS</a></li> 21 <li><a href="local_macro.html">BOOST_PP_LOCAL_MACRO</a></li> 22 </ul> 23 <h4>Requirements</h4> 24 <div> 25 <b>Header:</b> <a href="../headers/iteration/local.html"><boost/preprocessor/iteration/local.hpp></a> 26 </div> 27 <h4>Sample Code</h4> 28<div><pre> 29#include <<a href="../headers/iteration/local.html">boost/preprocessor/iteration/local.hpp</a>> 30 31template<int> struct sample; 32 33#define <a href="local_macro.html">BOOST_PP_LOCAL_MACRO</a>(n) \ 34 template<> struct sample<n> { \ 35 enum { value = n }; \ 36 }; \ 37 /**/ 38 39#define <a href="local_limits.html">BOOST_PP_LOCAL_LIMITS</a> (1, 5) 40 41#include <a href="local_iterate.html">BOOST_PP_LOCAL_ITERATE</a>() 42/* expands to... 43template<> struct sample<1> { enum { value = 1 }; }; 44template<> struct sample<2> { enum { value = 2 }; }; 45template<> struct sample<3> { enum { value = 3 }; }; 46template<> struct sample<4> { enum { value = 4 }; }; 47template<> struct sample<5> { enum { value = 5 }; }; 48*/ 49</pre></div> 50 <hr size="1"> 51 <div style="margin-left: 0px;"> 52 <i>� Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i> 53 </br><i>� Copyright Paul Mensonides 2002</i> 54 </div> 55 <div style="margin-left: 0px;"> 56 <p><small>Distributed under the Boost Software License, Version 1.0. (See 57 accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or 58 copy at <a href= 59 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> 60 </div> 61</body> 62</html> 63