1<html> 2<head> 3 <title>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</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_ENUM_PARAMS_WITH_DEFAULTS</b> macro generates a comma-separated list of parameters with default arguments. 9 </div> 10 <h4>Usage</h4> 11 <div class="code"> 12 <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b>(<i>count</i>, <i>param</i>, <i>def</i>) 13 </div> 14 <h4>Arguments</h4> 15 <dl> 16 <dt>count</dt> 17 <dd> 18 The number of parameters to generate. 19 Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>. 20 </dd> 21 <dt>param</dt> 22 <dd> 23 The text of the parameter. 24 <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i> 25 to generate parameters. 26 </dd> 27 <dt>def</dt> 28 <dd> 29 The default value that trails each parameter. 30 <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i> 31 to generate default arguments. 32 </dd> 33 </dl> 34 <h4>Remarks</h4> 35 <div> 36 This macro expands to the comma-separated sequence: 37 <div> 38 <i>param</i> ## <i>0</i> = <i>def</i> ## <i>0</i>, <i>param</i> ## <i>1</i> = <i>def</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i> = <i>def</i> ## <i>count</i> - <i>1</i> 39 </div> 40 </div> 41 <div> 42 Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>. 43 This limitation no longer exists, as the library can automatically detect the next available repetition depth. 44 </div> 45 <div> 46 This macro is deprecated. 47 It only exists for backward compatibility. 48 Use <b>BOOST_PP_ENUM_BINARY_PARAMS</b> instead: 49 <div> 50 <b>BOOST_PP_ENUM_BINARY_PARAMS</b>(<i>count</i>, <i>param</i>, = <i>def</i>) 51 </div> 52 </div> 53 <h4>See Also</h4> 54 <ul> 55 <li><a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a></li> 56 <li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li> 57 </ul> 58 <h4>Requirements</h4> 59 <div> 60 <b>Header:</b> <a href="../headers/repetition/epwd.html"><boost/preprocessor/repetition/enum_params_with_defaults.hpp></a> 61 </div> 62 <h4>Sample Code</h4> 63<div><pre> 64#include <<a href="../headers/repetition/epwd.html">boost/preprocessor/repetition/enum_params_with_defaults.hpp</a>> 65 66<a href="enum_params_with_defaults.html">BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a>(3, class T, U) 67 // expands to class T0 = U0, class T1 = U1, class T2 = U2 68 69<a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a>(3, class T, = U) 70 // expands to class T0 = U0, class T1 = U1, class T2 = U2 71</pre></div> 72 <hr size="1"> 73 <div style="margin-left: 0px;"> 74 <i>� Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i> 75 </br><i>� Copyright Paul Mensonides 2002</i> 76 </div> 77 <div style="margin-left: 0px;"> 78 <p><small>Distributed under the Boost Software License, Version 1.0. (See 79 accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or 80 copy at <a href= 81 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> 82 </div> 83</body> 84</html> 85