Boost logo

Boost :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-04-30 20:57:57

[2003-04-30] Paul Mensonides wrote:

>David Abrahams wrote:
>> ** and which I'm not sure is even addressing a real-world problem. It
>> might be; I am just not sure.
>It is not something that can't be worked around, but it is a nuisance.
>Basically, you have to expand a macro to produce a comma--but do it only at
>last possible step so it doesn't go through any other macros. The problem
>not that so much. Rather, it implies that you have to pass everything else
>such an "invocable" entity--which is annoying at best.

If that's the case would not a more general utility to insert/escape
literals be desirable.

Perhaps adding an #escape or #literal command to the preprocessor which only
replaces the argument as the last stage after all other replacements?

And to rephrase Vesa's example...

#define ID(x) x
ID( #escape "(" )
ID( a #escape "," b )
ID( #escape ")" )

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq

Boost list run by bdawes at, gregod at, cpdaniel at, john at