Dear LLeweLLyn Reese!
You wrote:
The token-pasting operator is only for making tokens - 'foo##bar' becomes the single token 'foobar' and its result must always produce a single valid token (or the results are undefined). Your examples would have pasted a comma onto the begining of a multichar token, and , is only a valid token by itself.
Ran into the same problem with a construct like this:
this-> ## v
If I change it to
this->x ## v
it works, but that's obviously not what I want. Same problem when constructing namespace defines like:
mynamespace:: ## v
Is there a way to convince the preprocessor, that I know, what I'm doing and to accept the result as a vaild token (what it is in C++)? This is with gcc (GCC) 3.3.1 20030626 (Debian prerelease).
they are not valid single tokens. The preprocessor is correct. Why do you think you need a ## at all?
nathan
-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC The voices in my head said this was stupid too nathan@xxxxxxxxxxxxxxxx :: http://www.planetfall.pwp.blueyonder.co.uk