Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1549: template function return type

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
accord Posted - Mar 24 2007 : 1:11:15 PM
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.
4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jun 01 2012 : 8:56:49 PM
case=5690 is fixed in build 1908
feline Posted - Mar 26 2007 : 2:19:00 PM
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
accord Posted - Mar 24 2007 : 10:10:33 PM
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?
feline Posted - Mar 24 2007 : 6:36:38 PM
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.

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