mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-06-30 06:20:57 +02:00
Compare commits
7 Commits
boost-1.30
...
boost-1.31
Author | SHA1 | Date | |
---|---|---|---|
624ecc2777 | |||
e6a5f6ce5b | |||
d56c9b37a6 | |||
6241d12f49 | |||
9cc2279b2f | |||
85182b4426 | |||
7a652be8b4 |
@ -21,7 +21,7 @@
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
If <i>x</i> is non-zero, this macro expands to <i>1</i>.
|
||||
If <i>x</i> is zero, this macro expands to <i>1</i>.
|
||||
Otherwise, it expands to <i>0</i>.
|
||||
</div>
|
||||
<div>
|
||||
|
@ -24,7 +24,7 @@
|
||||
# define BOOST_PP_CONFIG_EDG() 0x0020
|
||||
#
|
||||
# ifndef BOOST_PP_CONFIG_FLAGS
|
||||
# if defined(__SPIRIT_PP__)
|
||||
# if defined(__SPIRIT_PP__) || defined(__MWERKS__) && __MWERKS__ >= 0x3200
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__EDG__) || defined(__EDG_VERSION__)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
|
||||
|
@ -14,6 +14,7 @@
|
||||
# define BOOST_PREPROCESSOR_SEQ_ELEM_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_ELEM */
|
||||
#
|
||||
@ -26,7 +27,7 @@
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II((BOOST_PP_SEQ_ELEM_ ## i seq))
|
||||
# define BOOST_PP_SEQ_ELEM_II(res) BOOST_PP_SEQ_ELEM_IV(BOOST_PP_SEQ_ELEM_III res)
|
||||
# define BOOST_PP_SEQ_ELEM_III(x, _) x
|
||||
# define BOOST_PP_SEQ_ELEM_III(x, _) x BOOST_PP_EMPTY()
|
||||
# define BOOST_PP_SEQ_ELEM_IV(x) x
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_SEQ_ELEM_I(par) BOOST_PP_SEQ_ELEM_II ## par
|
||||
|
@ -4,6 +4,6 @@
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="doc/index.htm">doc/index.html</a>.
|
||||
<a href="doc/index.html">doc/index.html</a>.
|
||||
</body>
|
||||
</html>
|
@ -32,25 +32,25 @@
|
||||
# elif defined NO_FLAGS
|
||||
|
||||
struct BOOST_PP_CAT(X, BOOST_PP_ITERATION()) {
|
||||
BEGIN
|
||||
BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() &&
|
||||
BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH()
|
||||
END
|
||||
BEGIN
|
||||
BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() &&
|
||||
BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH()
|
||||
END
|
||||
};
|
||||
|
||||
# elif BOOST_PP_ITERATION_DEPTH() == 1 \
|
||||
&& BOOST_PP_ITERATION_FLAGS() == 0x0001
|
||||
&& BOOST_PP_ITERATION_FLAGS() == 0x0001
|
||||
|
||||
struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { };
|
||||
|
||||
# elif BOOST_PP_ITERATION_DEPTH() == 1 \
|
||||
&& BOOST_PP_ITERATION_FLAGS() == 0x0002
|
||||
&& BOOST_PP_ITERATION_FLAGS() == 0x0002
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_ITERATION(), <libs/preprocessor/test/iteration.h>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
# elif BOOST_PP_ITERATION_DEPTH() == 2 \
|
||||
&& BOOST_PP_FRAME_FLAGS(1) == 0x0002
|
||||
&& BOOST_PP_FRAME_FLAGS(1) == 0x0002
|
||||
|
||||
struct BOOST_PP_CAT(Z, BOOST_PP_CAT(BOOST_PP_ITERATION(), BOOST_PP_RELATIVE_ITERATION(1))) { };
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
# define NTH(z, n, data) data ## n
|
||||
|
||||
int add(BOOST_PP_ENUM_PARAMS(MAX, int x)) {
|
||||
return BOOST_PP_REPEAT(MAX, NTH, + x);
|
||||
return BOOST_PP_REPEAT(MAX, NTH, + x);
|
||||
}
|
||||
|
||||
const int r = add(BOOST_PP_ENUM_PARAMS(MAX, 1 BOOST_PP_INTERCEPT));
|
||||
@ -32,9 +32,9 @@ const int r = add(BOOST_PP_ENUM_PARAMS(MAX, 1 BOOST_PP_INTERCEPT));
|
||||
const int BOOST_PP_ENUM(MAX, CONSTANT, default_param_);
|
||||
|
||||
# define TEST(n) \
|
||||
void BOOST_PP_CAT(test_enum_params, n)(BOOST_PP_ENUM_PARAMS(n, int x)); \
|
||||
void BOOST_PP_CAT(test_enum_params_with_a_default, n)(BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(n, int x, 0)); \
|
||||
void BOOST_PP_CAT(test_enum_params_with_defaults, n)(BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(n, int x, default_param_));
|
||||
void BOOST_PP_CAT(test_enum_params, n)(BOOST_PP_ENUM_PARAMS(n, int x)); \
|
||||
void BOOST_PP_CAT(test_enum_params_with_a_default, n)(BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(n, int x, 0)); \
|
||||
void BOOST_PP_CAT(test_enum_params_with_defaults, n)(BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(n, int x, default_param_));
|
||||
|
||||
TEST(0)
|
||||
TEST(MAX)
|
||||
|
@ -26,8 +26,8 @@ namespace std { }
|
||||
using namespace std;
|
||||
|
||||
int main(void) {
|
||||
printf("pass " __TIME__);
|
||||
return 0;
|
||||
printf("pass " __TIME__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user