diff --git a/include/boost/preprocessor/array.hpp b/include/boost/preprocessor/array.hpp index 7885f17..7daa289 100644 --- a/include/boost/preprocessor/array.hpp +++ b/include/boost/preprocessor/array.hpp @@ -15,7 +15,7 @@ # # define BOOST_PP_ARRAY(size, data) (size, data) # -# if !defined(__MWERKS__) || __MWERKS__ > 0x3001 +# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002 # define BOOST_PP_ARRAY_SIZE(arr) BOOST_PP_ARRAY_SIZE_I arr # else # define BOOST_PP_ARRAY_SIZE(arr) BOOST_PP_ARRAY_SIZE_D(arr) @@ -24,7 +24,7 @@ # # define BOOST_PP_ARRAY_SIZE_I(size, data) size # -# if !defined(__MWERKS__) || __MWERKS__ > 0x3001 +# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002 # define BOOST_PP_ARRAY_DATA(arr) BOOST_PP_ARRAY_DATA_I arr # else # define BOOST_PP_ARRAY_DATA(arr) BOOST_PP_ARRAY_DATA_D(arr) @@ -33,7 +33,7 @@ # # define BOOST_PP_ARRAY_DATA_I(size, data) data # -# if !defined(__MWERKS__) || __MWERKS__ > 0x3001 +# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002 # define BOOST_PP_ARRAY_ELEM(i, arr) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE_I arr, i, BOOST_PP_ARRAY_DATA_I arr) # else # define BOOST_PP_ARRAY_ELEM(i, arr) BOOST_PP_ARRAY_ELEM_D(i, arr) diff --git a/include/boost/preprocessor/detail/expand.hpp b/include/boost/preprocessor/detail/expand.hpp index 08b7939..958b9e0 100644 --- a/include/boost/preprocessor/detail/expand.hpp +++ b/include/boost/preprocessor/detail/expand.hpp @@ -12,7 +12,7 @@ */ # define BOOST_PP_DETAIL_EXPAND(X) X -# if !defined(__MWERKS__) || __MWERKS__ > 0x3001 +# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002 # define BOOST_PP_DETAIL_EXPAND2(X,Y) BOOST_PP_DETAIL_EXPAND(X Y) # else # define BOOST_PP_DETAIL_EXPAND2(X, Y) BOOST_PP_DETAIL_EXPAND2_DELAY(X, Y) diff --git a/include/boost/preprocessor/detail/line.hpp b/include/boost/preprocessor/detail/line.hpp index e32aff5..3e37c7b 100644 --- a/include/boost/preprocessor/detail/line.hpp +++ b/include/boost/preprocessor/detail/line.hpp @@ -13,7 +13,7 @@ # # include # -# if !defined(__MWERKS__) || __MWERKS__ > 0x3001 +# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002 # define BOOST_PP_DETAIL_LINE(text) 1 BOOST_PP_STRINGIZE(text) # else # define BOOST_PP_DETAIL_LINE(text) 1 diff --git a/include/boost/preprocessor/iterate.hpp b/include/boost/preprocessor/iterate.hpp index 1c39345..7eaab0a 100644 --- a/include/boost/preprocessor/iterate.hpp +++ b/include/boost/preprocessor/iterate.hpp @@ -50,7 +50,7 @@ # define BOOST_PP_RELATIVE_3(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) # define BOOST_PP_RELATIVE_4(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) # -# if defined BOOST_PP_EXTENDED_LINE_INFO && (!defined(__MWERKS__) || __MWERKS__ > 0x3001) +# if defined BOOST_PP_EXTENDED_LINE_INFO && (!defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002) # define BOOST_PP_LINE(line, file) line BOOST_PP_STRINGIZE(file BOOST_PP_DETAIL_CAT2(BOOST_PP_LINE_, BOOST_PP_ITERATION_DEPTH())) # else # define BOOST_PP_LINE(line, file) __LINE__ diff --git a/include/boost/preprocessor/tuple/elem.hpp b/include/boost/preprocessor/tuple/elem.hpp index b38e78f..4ffefee 100644 --- a/include/boost/preprocessor/tuple/elem.hpp +++ b/include/boost/preprocessor/tuple/elem.hpp @@ -32,7 +32,7 @@ BOOST_PP_TUPLE_ELEM(2,1,(A,B)) */ -#if !defined(__MWERKS__) || __MWERKS__ > 0x3001 +#if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002 # define BOOST_PP_TUPLE_ELEM(SIZE_OF_TUPLE,INDEX,TUPLE)\ BOOST_PP_DETAIL_EXPAND2(\ BOOST_PP_DETAIL_CAT2(BOOST_PP_TUPLE16_ELEM,INDEX)\ diff --git a/include/boost/preprocessor/tuple/reverse.hpp b/include/boost/preprocessor/tuple/reverse.hpp index 496c9a3..dd1c7e2 100644 --- a/include/boost/preprocessor/tuple/reverse.hpp +++ b/include/boost/preprocessor/tuple/reverse.hpp @@ -25,13 +25,13 @@ BOOST_PP_TUPLE_REVERSE(3,(A,B,C)) */ #define BOOST_PP_TUPLE_REVERSE(SIZE_OF_TUPLE,TUPLE) BOOST_PP_TUPLE_REVERSE_DELAY(SIZE_OF_TUPLE,TUPLE) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) +#if defined(BOOST_NO_COMPILER_CONFIG) || !defined(__MWERKS__) || __MWERKS__ > 0x3002 +# define BOOST_PP_TUPLE_REVERSE_DELAY(N,T) BOOST_PP_TUPLE##N##_REVERSE T +#else /* This is a workaround for a CodeWarrior PP bug. Strictly speaking * this workaround invokes undefined behavior, but it works as desired. */ # define BOOST_PP_TUPLE_REVERSE_DELAY(N,T) BOOST_PP_TUPLE##N##_REVERSE##T -#else -# define BOOST_PP_TUPLE_REVERSE_DELAY(N,T) BOOST_PP_TUPLE##N##_REVERSE T #endif #define BOOST_PP_TUPLE0_REVERSE() () #define BOOST_PP_TUPLE1_REVERSE(A) (A) diff --git a/include/boost/preprocessor/tuple/to_list.hpp b/include/boost/preprocessor/tuple/to_list.hpp index 2d5eaf1..fcb5546 100644 --- a/include/boost/preprocessor/tuple/to_list.hpp +++ b/include/boost/preprocessor/tuple/to_list.hpp @@ -39,13 +39,13 @@ BOOST_PP_LIST_NIL))) */ #define BOOST_PP_TUPLE_TO_LIST(SIZE_OF_TUPLE,TUPLE) BOOST_PP_TUPLE_TO_LIST_DELAY(SIZE_OF_TUPLE,TUPLE) -#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) +#if defined(BOOST_NO_COMPILER_CONFIG) || !defined(__MWERKS__) || __MWERKS__ > 0x3002 +# define BOOST_PP_TUPLE_TO_LIST_DELAY(N,T) BOOST_PP_TUPLE##N##_TO_LIST T +#else /* This is a workaround for a CodeWarrior PP bug. Strictly speaking * this workaround invokes undefined behavior, but it works as desired. */ # define BOOST_PP_TUPLE_TO_LIST_DELAY(N,T) BOOST_PP_TUPLE##N##_TO_LIST##T -#else -# define BOOST_PP_TUPLE_TO_LIST_DELAY(N,T) BOOST_PP_TUPLE##N##_TO_LIST T #endif #define BOOST_PP_TUPLE0_TO_LIST() (_,_,0) #define BOOST_PP_TUPLE1_TO_LIST(A) (A,(_,_,0),1)