Increased while loops by one to encompass maximum numbers.

This commit is contained in:
Edward Diener
2020-07-10 23:06:27 -04:00
parent c8e005f696
commit 0fbfe9c981
8 changed files with 26 additions and 13 deletions

View File

@ -14,6 +14,7 @@
# ifndef 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_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)
@ -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_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_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))