forked from boostorg/preprocessor
added shifted binary params
[SVN r30499]
This commit is contained in:
@ -147,6 +147,7 @@
|
||||
<li class="ps"><a href="headers/repetition/enum_params.html">enum_params.hpp</a></li>
|
||||
<li class="ps"><a href="headers/repetition/epwad.html">enum_params_with_a_default.hpp</a></li>
|
||||
<li class="ps"><a href="headers/repetition/epwd.html">enum_params_with_defaults.hpp</a></li>
|
||||
<li class="ps"><a href="headers/repetition/esbp.html">enum_shifted_binary_params.hpp</a></li>
|
||||
<li class="ps"><a href="headers/repetition/enum_shifted_params.html">enum_shifted_params.hpp</a></li>
|
||||
<li class="ps"><a href="headers/repetition/enum_shifted.html">enum_shifted.hpp</a></li>
|
||||
<li class="ps"><a href="headers/repetition/enum_trailing.html">enum_trailing.hpp</a></li>
|
||||
|
20
doc/headers/repetition/esbp.html
Normal file
20
doc/headers/repetition/esbp.html
Normal file
@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>repetition/enum_shifted_binary_params.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>repetition/enum_shifted_binary_params.hpp</b> header defines a construct that produces a comma-separated list of binary parameters.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
#include <b><boost/preprocessor/repetition/enum_shifted_binary_params.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/esbp.html">BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</a></li>
|
||||
<li><a href="../../ref/esbpz.html">BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -62,6 +62,8 @@
|
||||
<li><a href="ref/enum_params_with_defaults.html">ENUM_PARAMS_WITH_DEFAULTS*</a></li>
|
||||
<li><a href="ref/enum_params_z.html">ENUM_PARAMS_Z</a></li>
|
||||
<li><a href="ref/enum_shifted.html">ENUM_SHIFTED</a></li>
|
||||
<li><a href="ref/esbp.html">ENUM_SHIFTED_BINARY_PARAMS</a></li>
|
||||
<li><a href="ref/esbpz.html">ENUM_SHIFTED_BINARY_PARAMS_Z</a></li>
|
||||
<li><a href="ref/enum_shifted_params.html">ENUM_SHIFTED_PARAMS</a></li>
|
||||
<li><a href="ref/enum_shifted_params_z.html">ENUM_SHIFTED_PARAMS_Z</a></li>
|
||||
<li><a href="ref/enum_shifted_z.html">ENUM_SHIFTED_<i>z</i></a></li>
|
||||
|
54
doc/ref/esbp.html
Normal file
54
doc/ref/esbp.html
Normal file
@ -0,0 +1,54 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_ENUM_BINARY_PARAMS</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</b> macro generates a comma-separated, shifted list of binary parameters.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</b>(<i>count</i>, <i>p1</i>, <i>p2</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>count</dt>
|
||||
<dd>
|
||||
The number of parameters to generate.
|
||||
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
|
||||
</dd>
|
||||
<dt>p1</dt>
|
||||
<dd>
|
||||
The text of the first part of the parameter.
|
||||
<b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
|
||||
to generate parameters.
|
||||
</dd>
|
||||
<dt>p2</dt>
|
||||
<dd>
|
||||
The text of the first part of the parameter.
|
||||
<b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
|
||||
to generate parameters.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro expands to the comma-separated sequence:
|
||||
<div>
|
||||
<i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, <i>p1</i> ## <i>2</i> <i>p2</i> ## <i>2</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</b>.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="esbpz.html">BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</a></li>
|
||||
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/repetition/esbp.html"><boost/preprocessor/repetition/enum_shifted_binary_params.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
56
doc/ref/esbpz.html
Normal file
56
doc/ref/esbpz.html
Normal file
@ -0,0 +1,56 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</b> macro generates a comma-separated list, shifted of binary parameters.
|
||||
It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>p1</i>, <i>p2</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>z</dt>
|
||||
<dd>
|
||||
The next available <b>BOOST_PP_REPEAT</b> dimension.
|
||||
</dd>
|
||||
<dt>count</dt>
|
||||
<dd>
|
||||
The number of parameters to generate.
|
||||
Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
|
||||
</dd>
|
||||
<dt>p1</dt>
|
||||
<dd>
|
||||
The text of the first part of the parameter.
|
||||
<b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
|
||||
to generate parameters.
|
||||
</dd>
|
||||
<dt>p2</dt>
|
||||
<dd>
|
||||
The text of the first part of the parameter.
|
||||
<b>BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
|
||||
to generate parameters.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro expands to the comma-separated sequence:
|
||||
<div>
|
||||
<i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, <i>p1</i> ## <i>2</i> <i>p2</i> ## <i>2</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
|
||||
</div>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="esbp.html">BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS</a></li>
|
||||
<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/repetition/esbp.html"><boost/preprocessor/repetition/enum_shifted_binary_params.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -20,6 +20,7 @@
|
||||
# include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_params_with_defaults.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_shifted_binary_params.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_trailing.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
|
||||
|
@ -0,0 +1,51 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2005. *
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See *
|
||||
# * accompanying file LICENSE_1_0.txt or copy at *
|
||||
# * http://www.boost.org/LICENSE_1_0.txt) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_BINARY_PARAMS_HPP
|
||||
# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_BINARY_PARAMS_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/repetition/repeat.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS(count, p1, p2) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M, (p1, p2))
|
||||
# else
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS(count, p1, p2) BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_I(count, p1, p2)
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_I(count, p1, p2) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M, (p1, p2))
|
||||
# endif
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M_IM(z, n, BOOST_PP_TUPLE_REM_2 pp)
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M_I(z, n, im)
|
||||
# else
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, pp), BOOST_PP_TUPLE_ELEM(2, 1, pp))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(p1, BOOST_PP_INC(n)) BOOST_PP_CAT(p2, BOOST_PP_INC(n))
|
||||
#
|
||||
# /* BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M, (p1, p2))
|
||||
# else
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z_I(z, count, p1, p2)
|
||||
# define BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_Z_I(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS_M, (p1, p2))
|
||||
# endif
|
||||
#
|
||||
# endif
|
Reference in New Issue
Block a user