This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with macro expantion when '::' is within a string
- From: Felix Lee <felix dot 1 at canids dot net>
- To: Lars Holm <lars dot holm at bonetmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 07 Dec 2003 23:10:21 -0800
- Subject: Re: Problem with macro expantion when '::' is within a string
- References: <3FD3EE5E.90707@bonetmail.com>
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
--