forked from boostorg/preprocessor
Increased while loops by one to encompass maximum numbers.
This commit is contained in:
@ -16,14 +16,15 @@
|
|||||||
#
|
#
|
||||||
# /* BOOST_PP_DEDUCE_D */
|
# /* BOOST_PP_DEDUCE_D */
|
||||||
#
|
#
|
||||||
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
# include <boost/preprocessor/control/while.hpp>
|
# include <boost/preprocessor/control/while.hpp>
|
||||||
# include <boost/preprocessor/detail/auto_rec.hpp>
|
# include <boost/preprocessor/detail/auto_rec.hpp>
|
||||||
# include <boost/preprocessor/config/limits.hpp>
|
# include <boost/preprocessor/config/limits.hpp>
|
||||||
#
|
#
|
||||||
# if BOOST_PP_LIMIT_WHILE == 256
|
# if BOOST_PP_LIMIT_WHILE == 256
|
||||||
# define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)
|
# define BOOST_PP_DEDUCE_D() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256))
|
||||||
# elif BOOST_PP_LIMIT_WHILE == 512
|
# elif BOOST_PP_LIMIT_WHILE == 512
|
||||||
# define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512)
|
# define BOOST_PP_DEDUCE_D() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512))
|
||||||
# else
|
# else
|
||||||
# error Incorrect value for the BOOST_PP_LIMIT_WHILE limit
|
# error Incorrect value for the BOOST_PP_LIMIT_WHILE limit
|
||||||
# endif
|
# endif
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_DMC_WHILE_256_HPP
|
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_DMC_WHILE_256_HPP
|
||||||
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_DMC_WHILE_256_HPP
|
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_DMC_WHILE_256_HPP
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0(p, o, s) BOOST_PP_WHILE_0_C(BOOST_PP_BOOL(p##(1, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p##(2, s)), p, o, s)
|
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p##(2, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p##(3, s)), p, o, s)
|
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p##(3, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p##(4, s)), p, o, s)
|
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p##(4, s)), p, o, s)
|
||||||
@ -271,6 +272,7 @@
|
|||||||
# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p##(256, s)), p, o, s)
|
# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p##(256, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p##(257, s)), p, o, s)
|
# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p##(257, s)), p, o, s)
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_1, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(1, s))
|
||||||
# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(2, s))
|
# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(2, s))
|
||||||
# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(3, s))
|
# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(3, s))
|
||||||
# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(4, s))
|
# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(4, s))
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_256_HPP
|
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_256_HPP
|
||||||
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_256_HPP
|
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_256_HPP
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0(p, o, s) BOOST_PP_WHILE_0_I(p, o, s)
|
||||||
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_I(p, o, s)
|
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_I(p, o, s)
|
||||||
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_I(p, o, s)
|
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_I(p, o, s)
|
||||||
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_I(p, o, s)
|
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_I(p, o, s)
|
||||||
@ -271,6 +272,7 @@
|
|||||||
# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_I(p, o, s)
|
# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_I(p, o, s)
|
||||||
# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_I(p, o, s)
|
# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_I(p, o, s)
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0_I(p, o, s) BOOST_PP_IF(p(1, s), BOOST_PP_WHILE_1, s BOOST_PP_TUPLE_EAT_3)(p, o, o(1, s))
|
||||||
# define BOOST_PP_WHILE_1_I(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s))
|
# define BOOST_PP_WHILE_1_I(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s))
|
||||||
# define BOOST_PP_WHILE_2_I(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s))
|
# define BOOST_PP_WHILE_2_I(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s))
|
||||||
# define BOOST_PP_WHILE_3_I(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s))
|
# define BOOST_PP_WHILE_3_I(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s))
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_256_HPP
|
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_256_HPP
|
||||||
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_256_HPP
|
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_256_HPP
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0(p, o, s) BOOST_PP_WHILE_0_C(BOOST_PP_BOOL(p(1, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p(2, s)), p, o, s)
|
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p(2, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p(3, s)), p, o, s)
|
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p(3, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p(4, s)), p, o, s)
|
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p(4, s)), p, o, s)
|
||||||
@ -271,6 +272,7 @@
|
|||||||
# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p(256, s)), p, o, s)
|
# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p(256, s)), p, o, s)
|
||||||
# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p(257, s)), p, o, s)
|
# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p(257, s)), p, o, s)
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_1, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(1, s))
|
||||||
# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(2, s))
|
# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(2, s))
|
||||||
# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(3, s))
|
# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(3, s))
|
||||||
# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(4, s))
|
# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(4, s))
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_256_HPP
|
# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_256_HPP
|
||||||
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_256_HPP
|
# define BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_256_HPP
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_0(p, o, s) BOOST_PP_IF(p(1, s), BOOST_PP_WHILE_1, s BOOST_PP_TUPLE_EAT_3)(p, o, o(1, s))
|
||||||
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s))
|
# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s))
|
||||||
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s))
|
# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s))
|
||||||
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s))
|
# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s))
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_256_HPP
|
# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_256_HPP
|
||||||
# define BOOST_PREPROCESSOR_CONTROL_WHILE_256_HPP
|
# define BOOST_PREPROCESSOR_CONTROL_WHILE_256_HPP
|
||||||
#
|
#
|
||||||
|
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_0(p, o, s) 0
|
||||||
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0
|
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0
|
||||||
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0
|
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0
|
||||||
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0
|
# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP
|
# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP
|
||||||
# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP
|
# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP
|
||||||
#
|
#
|
||||||
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
# include <boost/preprocessor/debug/error.hpp>
|
# include <boost/preprocessor/debug/error.hpp>
|
||||||
@ -31,17 +32,19 @@
|
|||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# if BOOST_PP_LIMIT_WHILE == 256
|
# if BOOST_PP_LIMIT_WHILE == 256
|
||||||
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256))
|
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)))
|
||||||
# elif BOOST_PP_LIMIT_MAG == 512
|
# elif BOOST_PP_LIMIT_MAG == 512
|
||||||
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512))
|
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512)))
|
||||||
# else
|
# else
|
||||||
# error Incorrect value for the BOOST_PP_LIMIT_WHILE limit
|
# error Incorrect value for the BOOST_PP_LIMIT_WHILE limit
|
||||||
# endif
|
# endif
|
||||||
|
#
|
||||||
|
# define BOOST_PP_WHILE_P(n) BOOST_PP_WHILE_P_DEC(BOOST_PP_DEC(n))
|
||||||
|
#
|
||||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||||
# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))))
|
# define BOOST_PP_WHILE_P_DEC(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_CAT(BOOST_PP_WHILE_ , n)(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_ , n)(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_ , n)(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))))
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))
|
# define BOOST_PP_WHILE_P_DEC(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_CAT(BOOST_PP_WHILE_ , n)(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_ , n)(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))
|
||||||
# endif
|
# endif
|
||||||
#
|
#
|
||||||
# define BOOST_PP_WHILE_F(d, _) 0
|
# define BOOST_PP_WHILE_F(d, _) 0
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
# /* BOOST_PP_REPEAT_FROM_TO */
|
# /* BOOST_PP_REPEAT_FROM_TO */
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||||
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
@ -39,13 +40,13 @@
|
|||||||
# include <boost/preprocessor/config/limits.hpp>
|
# include <boost/preprocessor/config/limits.hpp>
|
||||||
#
|
#
|
||||||
# if BOOST_PP_LIMIT_REPEAT == 256
|
# if BOOST_PP_LIMIT_REPEAT == 256
|
||||||
# define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt)
|
# define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)), f, l, m, dt)
|
||||||
# define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt)
|
# define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)), f, l, m, dt)
|
||||||
# define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt)
|
# define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)), f, l, m, dt)
|
||||||
# elif BOOST_PP_LIMIT_REPEAT == 512
|
# elif BOOST_PP_LIMIT_REPEAT == 512
|
||||||
# define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512), f, l, m, dt)
|
# define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512)), f, l, m, dt)
|
||||||
# define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512), f, l, m, dt)
|
# define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512)), f, l, m, dt)
|
||||||
# define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512), f, l, m, dt)
|
# define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512)), f, l, m, dt)
|
||||||
# else
|
# else
|
||||||
# error Incorrect value for the BOOST_PP_LIMIT_REPEAT limit
|
# error Incorrect value for the BOOST_PP_LIMIT_REPEAT limit
|
||||||
# endif
|
# endif
|
||||||
|
Reference in New Issue
Block a user