-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Andy Little
#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.
Thanks Paul. It works on gcc3.2, however I need to use CAT(Sign, Number) (or Just Sign ## Number) in the Macro too and then I get a bunch of warnings saying:
test.cpp:25:22: warning: pasting "-" and "60" does not give a valid preprocessing token
Let me see if I'm understanding you correctly... You need to construct (e.g.) 1e-1 and also need -1 in a different spot? In the former case, you have to paste the pieces together in the order as specified above so that at all times the result is a single valid preprocessing token. In the latter case, you don't need token-pasting at all. Just say: Sign Number. Regards, Paul Mensonides