|
Boost Users : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2006-01-20 16:52:34
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Andy Little
> Using gcc3.2 the concatenation of 1##Num where Num is
> negative leaves a space eg 1e#-1 --> 1e -1 as can be seen by
You aren't attempting to concatenate 1e and -1; you're attempting to concatenate
1e and -. I.e. token pasting is only operating on the two adjacent
preprocessing tokens...
<1e> ## <-> <1>
The result of this *should* be
<1e-> <1>
...because 1e- is a valid pp-number. However, it should not be <le-1>. To make
that, you'd have to first paste on the <->, then paste on the other number:
#define CAT(a, b) PRIMITIVE_CAT(a, b)
#define PRIMITIVE_CAT(a, b) a ## b
CAT(CAT(1e, -), 1)
This works for me (as it should) on gcc3.4.4. I can't speak for gcc3.2.
Regards,
Paul Mensonides
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net