Re: changeword
Re: changeword
- Subject: Re: changeword
- From: Lawrence Gold <email@hidden>
- Date: Tue, 5 Jul 2005 11:10:56 -0600
On Jul 5, 2005, at 7:59 AM, Luciano Mattiacci wrote:
Help ,
I am porting a CodeWarrior project to Xcode.
In my project I use the macro :
#define TCL_NEW(name,init) new name##init
the CW compiles it with success when init is () :
TCL_NEW(CArray,()) => CArray()
Xcode does not compile it , but Xcode produces the error :
error: pasting "CArray" and "(" does not give a valid
preprocessing token
If I'm reading the documentation correctly, this sort of
concatenation is not supported by the ANSI/ISO standard. From http://
developer.apple.com/documentation/DeveloperTools/gcc-4.0.0/cpp/
Concatenation.html:
"However, two tokens that don't together form a valid token cannot be
pasted together. For example, you cannot concatenate x with + in
either order."
In your case, you may be able to simply use
TCL_NEW(CArray,)
to get around the problem.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >changeword (From: Luciano Mattiacci <email@hidden>) |