diff --git a/include/boost/preprocessor/repetition/for.hpp b/include/boost/preprocessor/repetition/for.hpp index 5a63753..c38946b 100644 --- a/include/boost/preprocessor/repetition/for.hpp +++ b/include/boost/preprocessor/repetition/for.hpp @@ -16,6 +16,8 @@ # # include # include +# include +# include # include # # /* BOOST_PP_FOR */ @@ -42,7 +44,23 @@ # include # endif # -# define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p##(257, s)) +# else +# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p(257, s)) +# endif + +# define BOOST_PP_FOR_257_ERROR() BOOST_PP_ERROR(0x0002) +# define BOOST_PP_FOR_257(s, p, o, m) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_FOR_257_PR(s,p), \ + BOOST_PP_FOR_257_ERROR, \ + BOOST_PP_EMPTY \ + ) \ + () \ +/**/ +// # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) # # define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 #