Boost logo

Boost :

From: Chris Little (cslittle_at_[hidden])
Date: 2001-12-04 10:41:44


Vesa,
 
Sorry for the delay, my work intruded.
 
The change also work on CWP7 Mac and on CWP6.2 Mac. Maybe Daryle can try it
on CWP5.
 
Chris

-----Original Message-----
From: Vesa Karvonen [mailto:vesa.karvonen_at_[hidden]]
Sent: Tuesday, December 04, 2001 6:19 AM
To: boost_at_[hidden]
Subject: Re: [boost] Preprocessor workaround for CodeWarrior

Thanks!
 
Any results on the Mac CW? What about other versions?
 
If the workaround works on all CW versions (I'd assume that they use the
same preprocessor code on every compiler), I'll commit this change to the
tuple header:
 
diff -r1.2 tuple.hpp
49c49,55
< #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
 
----- Original Message ----- 
From: Chris  <mailto:cslittle_at_[hidden]> Little 
To: 'boost_at_[hidden]' <mailto:'boost_at_[hidden]'>  
Sent: Monday, December 03, 2001 22:34
Subject: RE: [boost] Preprocessor workaround for CodeWarrior
> -----Original Message----- 
> From: Vesa Karvonen [mailto:vesa.karvonen_at_[hidden]
<mailto:vesa.karvonen_at_[hidden]> ] 
> Sent: Monday, December 03, 2001 2:41 PM 
> To: boost_at_[hidden] <mailto:boost_at_[hidden]>  
> Subject: [boost] Preprocessor workaround for CodeWarrior 
> 
> 
> Hi, 
> 
> Could someone with access to CodeWarrior (7.0) (PC &| Mac) 
> compiler try the following workaround. I have access to 
> "CodeWarrior for Palm OS Platform 7.0", but I do not have 
> access to other versions. I know that it invokes undefined 
> behaviour, but it is simple and it seems to work on that 
> particular compiler. 
> 
> Change line 49 of boost\preprocessor\tuple.hpp to: 
> 
> #define BOOST_PREPROCESSOR_TUPLE_ELEM_DELAY(N,I,T)\ 
>   BOOST_PREPROCESSOR_TUPLE##N##_ELEM##I##T 
> 
> Regards, 
>   Vesa Karvonen 
With this change preprocessor_test.cpp compiles and runs fine under CWP 7 on
PC.  I will try in on my Mac later. 
Chris 



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk