MWCW workaround

[SVN r12760]
This commit is contained in:
Vesa Karvonen
2002-02-08 16:54:43 +00:00
parent 332e6a9ac4
commit 4c6d309384
2 changed files with 16 additions and 2 deletions

View File

@ -26,7 +26,14 @@
#define BOOST_PP_TUPLE_REVERSE(N,T) BOOST_PP_TUPLE_REVERSE_DELAY(N,T)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define BOOST_PP_TUPLE_REVERSE_DELAY(N,T) BOOST_PP_TUPLE##N##_REVERSE T
#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406
/* 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)
#define BOOST_PP_TUPLE2_REVERSE(A,B) (B,A)

View File

@ -40,7 +40,14 @@
#define BOOST_PP_TUPLE_TO_LIST(N,T) BOOST_PP_TUPLE_TO_LIST_DELAY(N,T)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define BOOST_PP_TUPLE_TO_LIST_DELAY(N,T) BOOST_PP_TUPLE##N##_TO_LIST T
#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__) && __MWERKS__ <= 0x2406
/* 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)
#define BOOST_PP_TUPLE2_TO_LIST(A,B) (A,(B,(_,_,0),1),1)