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
 1549: template function return type
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 24 2007 :  1:11:15 PM  Show Profile  Reply with Quote
It seems to VAX do not handle template function return types correctly.

Try this example:

class cLilu {
public:
	int poke;
	int peek;
};

template <class T> class tRef {
public:
	int apple;
	int banana;

	template <class TF> TF* GetAs()
	{
             // code
	}
};

void Lo(void)
{
	tRef l;
	l.GetAs<cLilu>()->peek;
}

In this example, peek will be an unrecognised variable for VAX. Intellisense recognises it and I keep checked "Get content default intellisense", but I would like to use VAX's others features also

Thanks for your help.

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 24 2007 :  6:36:38 PM  Show Profile  Reply with Quote
using VS2003 and VA 1549 I added this code to a cpp file, and if I press CTRL-SPACE after "->" then the correct items are suggested. This is with "Get content from default Intellisense" turned off.

I am not seeing any underlining by VA either, but alt-g on "->peek" fails. Are you seeing other problems, or is this just it?

I am not completely surprised VA has some problems here, templates have traditionally been a tricky area for VA.

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 24 2007 :  10:10:33 PM  Show Profile  Reply with Quote
Yes, Alt+G fails, and Find References, rename, etc. also do not work on this symbol.

>I am not completely surprised VA has some problems here,
>templates have traditionally been a tricky area for VA.
Any plan for generally improving template support? At least in next major beta phase, when regressions are more acceptable (I mean a general parser improve can lead to regressions)

Please! This is the only one major shortcoming of VAX (for me)

If I can remember correctly, you said "build 1301" had a great template support, so you CAN do it again! What do you think?

Edited by - accord on Mar 24 2007 10:31:07 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 26 2007 :  2:19:00 PM  Show Profile  Reply with Quote
Actually, back in 1301 better template support was a very common topic on the forum. The compiler can take as many hours as it wants to sort out complex template code, we need to sort it out quite a bit faster

Template handling got a lot getter around VA 1446, when the parser was re-written, but it is still not 100%.

case=5690

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jun 01 2012 :  8:56:49 PM  Show Profile  Reply with Quote
case=5690 is fixed in build 1908
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000