Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 #define and token-pasting operator (##) using

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Mariano Posted - Jan 16 2012 : 08:10:15 AM
Hello,

There is a little problem with makro parsing by VAX.

#define CLASS_XXX( TheClass ) \class TheClass##XXX	  \	{		  \	public:		  \		static void Do() {}	  \	};

int main()
{
CLASS_XXX( A )
AXXX::Do();

return 0;
}


When You type:
AXXX::
assist should prompt that Do() member is available and I'm should be able to selected it from list ( in this case Do() member )

I'm thinking that the problem is with token-pasting operator (##). On below piece of code VAX properly expand lists of members.


#define CLASS_XXX( TheClass ) \	class TheClass			  \	{						  \	public:					  \		static void Do() {}	  \	};

int main()
{
	CLASS_XXX( A )

	A::Do();

	return 0;
}


I'm using MS Visual 2005 Sp1, VAX version 10.6.1862.0 built 2011.12.13

Best regards,
Mariusz Brzeski.
2   L A T E S T    R E P L I E S    (Newest First)
support Posted - Feb 29 2012 : 1:24:39 PM
case=64029 is fixed in build 1901
accord Posted - Jan 16 2012 : 3:43:59 PM
The problem is caused by the spaces around (especially after) the macro argument. It works if you replace the line with the following:

CLASS_XXX(A)

I have put in a bug report for this:

case=64029

This is unexpected Thank you for sample code.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000