workaround for insidious bcc bug

[SVN r15212]
This commit is contained in:
Paul Mensonides
2002-09-08 21:15:30 +00:00
parent 393b019394
commit faaa55709b
12 changed files with 328 additions and 296 deletions

View File

@ -28,11 +28,15 @@
# endif
#
# define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256))
# define BOOST_PP_FOR_P(n) BOOST_PP_IS_NULLARY(BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M))
#
# define BOOST_PP_FOR_SR_P(r, s) s
# define BOOST_PP_FOR_SR_O(r, s) 0
# define BOOST_PP_FOR_SR_M(r, s) ()
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_BCC
# define BOOST_PP_FOR_P(n) BOOST_PP_IS_NULLARY(BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M))
# define BOOST_PP_FOR_SR_P(r, s) s
# define BOOST_PP_FOR_SR_O(r, s) 0
# define BOOST_PP_FOR_SR_M(r, s) ()
# else
# include <boost/preprocessor/repetition/detail/bcc/for_p.hpp>
# endif
#
# define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002)
#

View File

@ -29,8 +29,17 @@
#
# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
#
# define BOOST_PP_REPEAT_P(n) BOOST_PP_IS_NULLARY(BOOST_PP_REPEAT_ ## n(1, BOOST_PP_REPEAT_M, BOOST_PP_NIL))
# define BOOST_PP_REPEAT_M(z, n, _) ()
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_BCC
# define BOOST_PP_REPEAT_P(n) BOOST_PP_IS_NULLARY(BOOST_PP_REPEAT_ ## n(1, BOOST_PP_REPEAT_M, BOOST_PP_NIL))
# define BOOST_PP_REPEAT_M(z, n, _) ()
# else
# define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_HACKED_REPEAT_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_REPEAT_M, BOOST_PP_NIL))
# define BOOST_PP_REPEAT_M(z, n, _) BOOST_PP_NIL
# define BOOST_PP_HACKED_REPEAT_BOOST_PP_NIL 1
# define BOOST_PP_HACKED_REPEAT_BOOST_PP_REPEAT_1(c, m, d) 0
# define BOOST_PP_HACKED_REPEAT_BOOST_PP_REPEAT_2(c, m, d) 0
# define BOOST_PP_HACKED_REPEAT_BOOST_PP_REPEAT_3(c, m, d) 0
# endif
#
# if BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_IDEAL
# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_CAT(BOOST_PP_REPEAT_1_, c)(m, d)