diff --git a/include/boost/preprocessor/arithmetic/add.hpp b/include/boost/preprocessor/arithmetic/add.hpp index 7bb9e0e..2bc902f 100644 --- a/include/boost/preprocessor/arithmetic/add.hpp +++ b/include/boost/preprocessor/arithmetic/add.hpp @@ -37,7 +37,7 @@ single token).
/**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_ADD_D(D,X,Y) BOOST_PP_TUPLE_ELEM(2,0,BOOST_PP_WHILE##D(BOOST_PP_ADD_C,BOOST_PP_ADD_F,(X,Y))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_ADD_C(D,P) BOOST_PP_TUPLE_ELEM(2,1,P) # define BOOST_PP_ADD_F(D,P) (BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(2,0,P)),BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(2,1,P))) #else diff --git a/include/boost/preprocessor/arithmetic/div.hpp b/include/boost/preprocessor/arithmetic/div.hpp index b1931ae..ad191ad 100644 --- a/include/boost/preprocessor/arithmetic/div.hpp +++ b/include/boost/preprocessor/arithmetic/div.hpp @@ -35,7 +35,7 @@ single token). /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_DIV_D(D,X,Y) BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_WHILE##D(BOOST_PP_DIV_C,BOOST_PP_DIV_F,(0,X,Y))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_DIV_C(D,P) BOOST_PP_LESS_EQUAL_D(D,BOOST_PP_TUPLE_ELEM(3,2,P),BOOST_PP_TUPLE_ELEM(3,1,P)) # define BOOST_PP_DIV_F(D,P) (BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3,0,P)),BOOST_PP_SUB_D(D,BOOST_PP_TUPLE_ELEM(3,1,P),BOOST_PP_TUPLE_ELEM(3,2,P)),BOOST_PP_TUPLE_ELEM(3,2,P)) #else diff --git a/include/boost/preprocessor/arithmetic/mul.hpp b/include/boost/preprocessor/arithmetic/mul.hpp index 9359ae3..339a4b8 100644 --- a/include/boost/preprocessor/arithmetic/mul.hpp +++ b/include/boost/preprocessor/arithmetic/mul.hpp @@ -34,7 +34,7 @@ single token). /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_MUL_D(D,X,Y) BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_WHILE##D(BOOST_PP_MUL_C,BOOST_PP_MUL_F,(0,X,Y))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_MUL_C(D,P) BOOST_PP_TUPLE_ELEM(3,2,P) # define BOOST_PP_MUL_F(D,P) (BOOST_PP_ADD_D(D,BOOST_PP_TUPLE_ELEM(3,0,P),BOOST_PP_TUPLE_ELEM(3,1,P)),BOOST_PP_TUPLE_ELEM(3,1,P),BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(3,2,P))) #else diff --git a/include/boost/preprocessor/arithmetic/sub.hpp b/include/boost/preprocessor/arithmetic/sub.hpp index 9918b85..a7f4f14 100644 --- a/include/boost/preprocessor/arithmetic/sub.hpp +++ b/include/boost/preprocessor/arithmetic/sub.hpp @@ -36,7 +36,7 @@ single token). /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_SUB_D(D,X,Y) BOOST_PP_TUPLE_ELEM(2,0,BOOST_PP_WHILE##D(BOOST_PP_SUB_C,BOOST_PP_SUB_F,(X,Y))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_SUB_C(D,P) BOOST_PP_TUPLE_ELEM(2,1,P) # define BOOST_PP_SUB_F(D,P) (BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(2,0,P)),BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(2,1,P))) #else diff --git a/include/boost/preprocessor/enum.hpp b/include/boost/preprocessor/enum.hpp index d5e3daa..b1bfe3a 100644 --- a/include/boost/preprocessor/enum.hpp +++ b/include/boost/preprocessor/enum.hpp @@ -51,7 +51,7 @@ */ #define BOOST_PP_ENUM(N,F,P) BOOST_PP_REPEAT(N,BOOST_PP_ENUM_F,(F,P)) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_ENUM_F(I,FP) BOOST_PP_COMMA_IF(I) BOOST_PP_TUPLE_ELEM(2,0,FP)(I,BOOST_PP_TUPLE_ELEM(2,1,FP)) #else # define BOOST_PP_ENUM_F(I,FP) BOOST_PP_COMMA_IF(I) BOOST_PP_TUPLE2_ELEM0 FP(I,BOOST_PP_TUPLE2_ELEM1 FP) diff --git a/include/boost/preprocessor/enum_params_with_a_default.hpp b/include/boost/preprocessor/enum_params_with_a_default.hpp index 018fdc6..430dbc7 100644 --- a/include/boost/preprocessor/enum_params_with_a_default.hpp +++ b/include/boost/preprocessor/enum_params_with_a_default.hpp @@ -48,7 +48,7 @@ */ #define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(N,P,D) BOOST_PP_ENUM(N,BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT_F,(P,D)) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT_F(I,PD) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,PD),I)=BOOST_PP_TUPLE_ELEM(2,1,PD) #else # define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT_F(I,PD) BOOST_PP_CAT(BOOST_PP_TUPLE2_ELEM0 PD,I)=BOOST_PP_TUPLE2_ELEM1 PD diff --git a/include/boost/preprocessor/enum_params_with_defaults.hpp b/include/boost/preprocessor/enum_params_with_defaults.hpp index 806f48f..58dc55c 100644 --- a/include/boost/preprocessor/enum_params_with_defaults.hpp +++ b/include/boost/preprocessor/enum_params_with_defaults.hpp @@ -51,7 +51,7 @@ */ #define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(N,P,D) BOOST_PP_ENUM(N,BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS_F,(P,D)) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS_F(I,PD) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,PD),I)=BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,PD),I) #else # define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS_F(I,PD) BOOST_PP_CAT(BOOST_PP_TUPLE2_ELEM0 PD,I)=BOOST_PP_CAT(BOOST_PP_TUPLE2_ELEM1 PD,I) diff --git a/include/boost/preprocessor/enum_shifted.hpp b/include/boost/preprocessor/enum_shifted.hpp index 2a2f990..912948d 100644 --- a/include/boost/preprocessor/enum_shifted.hpp +++ b/include/boost/preprocessor/enum_shifted.hpp @@ -46,7 +46,7 @@ */ #define BOOST_PP_ENUM_SHIFTED(N,F,P) BOOST_PP_ENUM(BOOST_PP_DEC(N),BOOST_PP_ENUM_SHIFTED_F,(F,P)) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_ENUM_SHIFTED_F(I,FP) BOOST_PP_TUPLE_ELEM(2,0,FP)(BOOST_PP_INC(I),BOOST_PP_TUPLE_ELEM(2,1,FP)) #else # define BOOST_PP_ENUM_SHIFTED_F(I,FP) BOOST_PP_TUPLE2_ELEM0 FP(BOOST_PP_INC(I),BOOST_PP_TUPLE2_ELEM1 FP) diff --git a/include/boost/preprocessor/list/adt.hpp b/include/boost/preprocessor/list/adt.hpp index 9fbc580..98eda39 100644 --- a/include/boost/preprocessor/list/adt.hpp +++ b/include/boost/preprocessor/list/adt.hpp @@ -70,14 +70,14 @@ and BOOST_PP_LIST_FOLD_RIGHT_2ND(): #define BOOST_PP_LIST_NIL (_,_,0) /**Expands to 1 if the list is not nil and 0 otherwise.
*/ -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_IS_CONS(L) BOOST_PP_TUPLE_ELEM(3,2,L) #else # define BOOST_PP_LIST_IS_CONS(L) BOOST_PP_TUPLE3_ELEM2 L #endif /**Expands to 1 if the list is nil and 0 otherwise.
*/ -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_IS_NIL(L) BOOST_PP_NOT(BOOST_PP_TUPLE_ELEM(3,2,L)) #else # define BOOST_PP_LIST_IS_NIL(L) BOOST_PP_NOT(BOOST_PP_TUPLE3_ELEM2 L) @@ -93,7 +93,7 @@ and BOOST_PP_LIST_FOLD_RIGHT_2ND():expands to 1.
*/ -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FIRST(L) BOOST_PP_TUPLE_ELEM(3,0,L) #else # define BOOST_PP_LIST_FIRST(L) BOOST_PP_TUPLE3_ELEM0 L @@ -115,7 +115,7 @@ and BOOST_PP_LIST_FOLD_RIGHT_2ND(): BOOST_PP_TUPLE_TO_LIST(4,(2,3,4,5)) */ -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_REST(L) BOOST_PP_TUPLE_ELEM(3,1,L) #else # define BOOST_PP_LIST_REST(L) BOOST_PP_TUPLE3_ELEM1 L diff --git a/include/boost/preprocessor/list/filter.hpp b/include/boost/preprocessor/list/filter.hpp index e32c485..ad884e7 100644 --- a/include/boost/preprocessor/list/filter.hpp +++ b/include/boost/preprocessor/list/filter.hpp @@ -45,7 +45,7 @@ for whichF(D,P,X)
is true.
/** Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_FILTER_D(D,F,P,L) BOOST_PP_TUPLE_ELEM(3,2,BOOST_PP_LIST_FOLD_RIGHT_D(D,BOOST_PP_LIST_FILTER_F,L,(F,P,(_,_,0)))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FILTER_F(D,H,P) (BOOST_PP_TUPLE_ELEM(3,0,P),BOOST_PP_TUPLE_ELEM(3,1,P),BOOST_PP_IF(BOOST_PP_TUPLE_ELEM(3,0,P)(D,BOOST_PP_TUPLE3_ELEM1 P,H),BOOST_PP_LIST_CONS,BOOST_PP_TUPLE2_ELEM1)(H,BOOST_PP_TUPLE_ELEM(3,2,P))) #elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) # define BOOST_PP_LIST_FILTER_F(D,H,P) (BOOST_PP_TUPLE_ELEM(3,0,P),BOOST_PP_TUPLE3_ELEM1 P,BOOST_PP_IF(BOOST_PP_TUPLE3_ELEM0 P(D,BOOST_PP_TUPLE3_ELEM1 P,H),BOOST_PP_LIST_CONS,BOOST_PP_TUPLE2_ELEM1)(H,BOOST_PP_TUPLE3_ELEM2 P)) diff --git a/include/boost/preprocessor/list/first_n.hpp b/include/boost/preprocessor/list/first_n.hpp index 55ecb89..46ee8e7 100644 --- a/include/boost/preprocessor/list/first_n.hpp +++ b/include/boost/preprocessor/list/first_n.hpp @@ -51,7 +51,7 @@ /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_FIRST_N_D(D,N,L) BOOST_PP_LIST_REVERSE_D(D,BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_WHILE##D(BOOST_PP_LIST_FIRST_N_C,BOOST_PP_LIST_FIRST_N_F,((_,_,0),L,N)))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FIRST_N_C(D,X) BOOST_PP_TUPLE_ELEM(3,2,X) # define BOOST_PP_LIST_FIRST_N_F(D,X) ((BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_TUPLE_ELEM(3,1,X)),BOOST_PP_TUPLE_ELEM(3,0,X),1),BOOST_PP_TUPLE_ELEM(3,1,BOOST_PP_TUPLE_ELEM(3,1,X)),BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(3,2,X))) #else diff --git a/include/boost/preprocessor/list/fold_left.hpp b/include/boost/preprocessor/list/fold_left.hpp index cad6ff1..1d4cb69 100644 --- a/include/boost/preprocessor/list/fold_left.hpp +++ b/include/boost/preprocessor/list/fold_left.hpp @@ -29,6 +29,19 @@ listL
(from the left or the start of the list).
)
+For example,
+ ++ #define TEST(D,P,X) BOOST_PP_CAT(P,X) + BOOST_PP_FOLD_LEFT(TEST,_,BOOST_PP_TUPLE_TO_LIST(3,(A,B,C))) ++ +
expands to:
+ ++ _ABC ++
L
(from the left or the start of the list).
/** Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_FOLD_LEFT_D(D,F,P,L) BOOST_PP_TUPLE_ELEM(3,1,BOOST_PP_WHILE##D(BOOST_PP_LIST_FOLD_LEFT_C,BOOST_PP_LIST_FOLD_LEFT_F,(F,P,L))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FOLD_LEFT_C(D,X) BOOST_PP_TUPLE_ELEM(3,2,BOOST_PP_TUPLE_ELEM(3,2,X)) # define BOOST_PP_LIST_FOLD_LEFT_F(D,X) (BOOST_PP_TUPLE_ELEM(3,0,X),BOOST_PP_TUPLE_ELEM(3,0,X)(D,BOOST_PP_TUPLE_ELEM(3,1,X),BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_TUPLE_ELEM(3,2,X))),BOOST_PP_TUPLE_ELEM(3,1,BOOST_PP_TUPLE_ELEM(3,2,X))) #elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) diff --git a/include/boost/preprocessor/list/fold_left_2nd.hpp b/include/boost/preprocessor/list/fold_left_2nd.hpp index 0ebb190..dc8c89b 100644 --- a/include/boost/preprocessor/list/fold_left_2nd.hpp +++ b/include/boost/preprocessor/list/fold_left_2nd.hpp @@ -21,7 +21,7 @@ /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_FOLD_LEFT_2ND_D(D,F,P,L) BOOST_PP_TUPLE_ELEM(3,1,BOOST_PP_WHILE##D(BOOST_PP_LIST_FOLD_LEFT_2ND_C,BOOST_PP_LIST_FOLD_LEFT_2ND_F,(F,P,L))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FOLD_LEFT_2ND_C(D,X) BOOST_PP_TUPLE_ELEM(3,2,BOOST_PP_TUPLE_ELEM(3,2,X)) # define BOOST_PP_LIST_FOLD_LEFT_2ND_F(D,X) (BOOST_PP_TUPLE_ELEM(3,0,X),BOOST_PP_TUPLE_ELEM(3,0,X)(D,BOOST_PP_TUPLE_ELEM(3,1,X),BOOST_PP_TUPLE_ELEM(3,0,BOOST_PP_TUPLE_ELEM(3,2,X))),BOOST_PP_TUPLE_ELEM(3,1,BOOST_PP_TUPLE_ELEM(3,2,X))) #elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) diff --git a/include/boost/preprocessor/list/fold_right.hpp b/include/boost/preprocessor/list/fold_right.hpp index 340dab1..7f137b7 100644 --- a/include/boost/preprocessor/list/fold_right.hpp +++ b/include/boost/preprocessor/list/fold_right.hpp @@ -51,7 +51,7 @@ listL
(from the right or the end of the list).
/** Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_FOLD_RIGHT_D(D,F,L,P) BOOST_PP_TUPLE_ELEM(2,1,BOOST_PP_LIST_FOLD_LEFT_D(D,BOOST_PP_LIST_FOLD_RIGHT_F,(F,P),BOOST_PP_LIST_REVERSE_D(D,L))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FOLD_RIGHT_F(D,P,H) (BOOST_PP_TUPLE_ELEM(2,0,P),BOOST_PP_TUPLE_ELEM(2,0,P)(D,H,BOOST_PP_TUPLE_ELEM(2,1,P))) #elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) # define BOOST_PP_LIST_FOLD_RIGHT_F(D,P,H) (BOOST_PP_TUPLE_ELEM(2,0,P),BOOST_PP_TUPLE_ELEM(2,0,P)(D,H,BOOST_PP_TUPLE2_ELEM1 P)) diff --git a/include/boost/preprocessor/list/fold_right_2nd.hpp b/include/boost/preprocessor/list/fold_right_2nd.hpp index 482d098..ca78cf6 100644 --- a/include/boost/preprocessor/list/fold_right_2nd.hpp +++ b/include/boost/preprocessor/list/fold_right_2nd.hpp @@ -21,7 +21,7 @@ /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_FOLD_RIGHT_2ND_D(D,F,L,P) BOOST_PP_TUPLE_ELEM(2,1,BOOST_PP_LIST_FOLD_LEFT_2ND_D(D,BOOST_PP_LIST_FOLD_RIGHT_2ND_F,(F,P),BOOST_PP_LIST_FOLD_LEFT_2ND_D(D,BOOST_PP_LIST_REVERSE_F,(_,_,0),L))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_FOLD_RIGHT_2ND_F(D,P,H) (BOOST_PP_TUPLE_ELEM(2,0,P),BOOST_PP_TUPLE_ELEM(2,0,P)(D,H,BOOST_PP_TUPLE_ELEM(2,1,P))) #elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) # define BOOST_PP_LIST_FOLD_RIGHT_2ND_F(D,P,H) (BOOST_PP_TUPLE_ELEM(2,0,P),BOOST_PP_TUPLE_ELEM(2,0,P)(D,H,BOOST_PP_TUPLE2_ELEM1 P)) diff --git a/include/boost/preprocessor/list/for_each_product.hpp b/include/boost/preprocessor/list/for_each_product.hpp index 7d7feab..1649b4d 100644 --- a/include/boost/preprocessor/list/for_each_product.hpp +++ b/include/boost/preprocessor/list/for_each_product.hpp @@ -45,7 +45,7 @@ explosion. /**Can be used inside BOOST_PP_FOR().
*/ #define BOOST_PP_LIST_FOR_EACH_PRODUCT_R(R,F,N,T_OF_L) BOOST_PP_LIST_FOR_EACH_PRODUCT_R2(0,F,BOOST_PP_TUPLE_TO_LIST(N,BOOST_PP_TUPLE_REVERSE(N,T_OF_L))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 ||\ +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) ||\ !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) # define BOOST_PP_LIST_FOR_EACH_PRODUCT_R2(R,F,LL) BOOST_PP_FOR##R((BOOST_PP_TUPLE_ELEM(3,0,LL),BOOST_PP_TUPLE_ELEM(3,1,LL),(_,_,0),F),BOOST_PP_LIST_FOR_EACH_PRODUCT_C,BOOST_PP_LIST_FOR_EACH_PRODUCT_F,BOOST_PP_LIST_FOR_EACH_PRODUCT_I0) # define BOOST_PP_LIST_FOR_EACH_PRODUCT_C(R,P) BOOST_PP_TUPLE_ELEM(3,2,BOOST_PP_TUPLE_ELEM(4,0,P)) diff --git a/include/boost/preprocessor/list/rest_n.hpp b/include/boost/preprocessor/list/rest_n.hpp index 9aa2973..1850d3c 100644 --- a/include/boost/preprocessor/list/rest_n.hpp +++ b/include/boost/preprocessor/list/rest_n.hpp @@ -51,7 +51,7 @@ listL
.
/** Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_REST_N_D(D,N,L) BOOST_PP_TUPLE_ELEM(2,0,BOOST_PP_WHILE##D(BOOST_PP_LIST_REST_N_C,BOOST_PP_LIST_REST_N_F,(L,N))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_REST_N_C(D,X) BOOST_PP_TUPLE_ELEM(2,1,X) # define BOOST_PP_LIST_REST_N_F(D,X) (BOOST_PP_TUPLE_ELEM(3,1,BOOST_PP_TUPLE_ELEM(2,0,X)),BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(2,1,X))) #else diff --git a/include/boost/preprocessor/list/transform.hpp b/include/boost/preprocessor/list/transform.hpp index 34b66db..0aa917c 100644 --- a/include/boost/preprocessor/list/transform.hpp +++ b/include/boost/preprocessor/list/transform.hpp @@ -55,7 +55,7 @@ of the list producing a new list. /**Can be used inside BOOST_PP_WHILE().
*/ #define BOOST_PP_LIST_TRANSFORM_D(D,F,P,L) BOOST_PP_TUPLE_ELEM(3,2,BOOST_PP_LIST_FOLD_RIGHT_D(D,BOOST_PP_LIST_TRANSFORM_F,L,(F,P,(_,_,0)))) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406 +#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) # define BOOST_PP_LIST_TRANSFORM_F(D,H,P) (BOOST_PP_TUPLE_ELEM(3,0,P),BOOST_PP_TUPLE_ELEM(3,1,P),(BOOST_PP_TUPLE_ELEM(3,0,P)(D,BOOST_PP_TUPLE_ELEM(3,1,P),H),BOOST_PP_TUPLE_ELEM(3,2,P),1)) #elif !defined(BOOST_NO_COMPILER_CONFIG) && defined(_MSC_VER) # define BOOST_PP_LIST_TRANSFORM_F(D,H,P) (BOOST_PP_TUPLE_ELEM(3,0,P),BOOST_PP_TUPLE3_ELEM1 P,(BOOST_PP_TUPLE_ELEM(3,0,P)(D,BOOST_PP_TUPLE3_ELEM1 P,H),BOOST_PP_TUPLE3_ELEM2 P,1)) diff --git a/include/boost/preprocessor/logical/bool.hpp b/include/boost/preprocessor/logical/bool.hpp index ef4a004..2bb144d 100644 --- a/include/boost/preprocessor/logical/bool.hpp +++ b/include/boost/preprocessor/logical/bool.hpp @@ -14,6 +14,8 @@ */ /**Expands to 0
if X == 0
and 1
if X != 0
.
For example, BOOST_PP_BOOL(3)
expands to 1
.
For example,
+ ++ #define TEST(I,P) P(I); + BOOST_PP_REPEAT(3,TEST,X) ++ +
expands to:
+ ++ X(0); X(1); X(2); ++
2D and 3D repetition are supported with the BOOST_PP_REPEAT_2ND() and diff --git a/include/boost/preprocessor/stringize.hpp b/include/boost/preprocessor/stringize.hpp index dfaaf68..24234ea 100644 --- a/include/boost/preprocessor/stringize.hpp +++ b/include/boost/preprocessor/stringize.hpp @@ -15,6 +15,8 @@ /**
Stringizes X
after it is macro expanded.
For example, BOOST_PP_STRINGIZE(BOOST_PP_CAT(a,b))
expands to "ab"
.