Problem with macro expantion when '::' is within a string

Felix Lee felix.1@canids.net
Mon Dec 8 07:10:00 GMT 2003


Lars Holm <lars.holm@bonetmail.com>:
> #define FOO(a,b)  a##::Foo(#b)
> The compiler complains with:
> foo.cxx:35:41: pasting "txBoolean" and "::" does not give a valid preprocessing token

You don't need the "##".  "##" is only useful when you want to
make a single word out of two separate words, such as
    tx ## Boolean
--



More information about the Gcc-help mailing list