From 40de542d88a8f4c156593be9083c46ed1718cb45 Mon Sep 17 00:00:00 2001 From: Vesa Karvonen Date: Wed, 5 Dec 2001 16:53:42 +0000 Subject: [PATCH] CodeWarrior workaround [SVN r11930] --- include/boost/preprocessor/tuple.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/preprocessor/tuple.hpp b/include/boost/preprocessor/tuple.hpp index d71a2ba..ff1d386 100644 --- a/include/boost/preprocessor/tuple.hpp +++ b/include/boost/preprocessor/tuple.hpp @@ -46,7 +46,13 @@ The above expands to: #define BOOST_PREPROCESSOR_TUPLE_ELEM(N,I,T) BOOST_PREPROCESSOR_TUPLE_ELEM_DELAY(N,I,T) #ifndef DOXYGEN_SHOULD_SKIP_THIS -#define BOOST_PREPROCESSOR_TUPLE_ELEM_DELAY(N,I,T) BOOST_PREPROCESSOR_IDENTITY(BOOST_PREPROCESSOR_TUPLE##N##_ELEM##I T)() +#if defined(__MWERKS__) && __MWERKS__ <= 0x2405 +// This is a workaround for a CodeWarrior preprocessor bug. Strictly speaking +// this workaround invokes undefined behavior, but it works as desired. +# define BOOST_PREPROCESSOR_TUPLE_ELEM_DELAY(N,I,T) BOOST_PREPROCESSOR_TUPLE##N##_ELEM##I##T +#else +# define BOOST_PREPROCESSOR_TUPLE_ELEM_DELAY(N,I,T) BOOST_PREPROCESSOR_IDENTITY(BOOST_PREPROCESSOR_TUPLE##N##_ELEM##I T)() +#endif #define BOOST_PREPROCESSOR_TUPLE1_ELEM0(E0) E0