Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Some templates are not being parsed correctly

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
wellental1 Posted - Apr 11 2012 : 08:20:55 AM
Hi!
I have the following code. i know, it doesn't make sense the way it is, at the moment: some things where stripped out, but it's compilable. the problem exists in the complete code used in production, also.



class IService1
{
public:
virtual ~IService1(){};

public:
virtual void Method1() = 0;
};


class IService2
{
public:
virtual ~IService2(){};

public:
virtual void Method2() = 0;
};



class ServiceProvider
{
public:
template<class TServiceInterface>
TServiceInterface& GetService()
{
return static_cast<ServiceProvider const* const>( this )->GetService();
};

template<class TServiceInterface>
const TServiceInterface& GetService() const
{
return *reinterpret_cast<const TServiceInterface*>( NULL );
};
};




If i want to use the serviceprovider-class in a blank console project (within the main-routine), the code-completion doesn't work. it shows absolutely nothing:



int _tmain( int aiArgCount, TCHAR* appsArgs[], TCHAR* appsEnvVars[] )
{
ServiceProvider x;

x.GetService<IService1>(). // sadly no code-completion here...

return 0;
}



The problem can be easily reproduced, using the whole project structure and settings i sent you with case-id 66058. Simply copy the code from this post into the main.cpp i sent to you to reproduce the problem.
thx in advance
max
3   L A T E S T    R E P L I E S    (Newest First)
wellental1 Posted - Jun 05 2012 : 4:21:35 PM
Just checked it out: Works like a charm!
Thanks!
support Posted - Jun 01 2012 : 8:54:40 PM
case=5690 is fixed in build 1908
accord Posted - Apr 11 2012 : 8:32:44 PM
Thank you for the clear example. VA don't handle template function return types correctly:

case=5690

turning on the following should help as a workaround:

VA Options -> Listboxes -> Get content from default intellisense

...if you didn't turn off default intellisense.

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