Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 #define and token-pasting operator (##) using
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mariano
New Member

Poland
6 Posts

Posted - Jan 16 2012 :  08:10:15 AM  Show Profile  Reply with Quote
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.

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Jan 16 2012 :  3:43:59 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Feb 29 2012 :  1:24:39 PM  Show Profile  Reply with Quote
case=64029 is fixed in build 1901
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000