Boost logo

Boost :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-05-01 15:59:11


[2003-05-01] Paul Mensonides wrote:

>Rene Rivera wrote:
>> No totally sure what arbitrary macros you mean. But yes, the "escaped"
>> token-string can be anything and it would only get inserted/evaluated
>> as the _last_ step. So it would have to unwind the parse recursion,
>> and then insert the escaped token-string. And with the #eval you
>> could control when any currectly accumulated #escape token-strings
>> are inserted.
>
>What I meant was something like:
>
>#define ID(x) x
>#define MACRO() 123
>
>ID( #escape "MACRO()" )
>
>Are you suggesting that the result should be "MACRO()" or that the
>invocation/processing of the escaped string should be deferred until after
>top-level scanning moves past it (conceptually)? In that case, it would
expand
>to "123". BTW, I like the second one better, but only because I can think
of,
>as usual, pathological usages of it. ;)

I also prefer the second, as I also can see "entertaining" uses for it. But
I was considering both at the same time, as in it's a choice to make
experimentally, when and if anyone implements such a thing :-)

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


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