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
 Some templates are not being parsed correctly
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wellental1
New Member

6 Posts

Posted - Apr 11 2012 :  08:20:55 AM  Show Profile  Reply with Quote
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

Edited by - wellental1 on Apr 11 2012 09:30:49 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 11 2012 :  8:32:44 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jun 01 2012 :  8:54:40 PM  Show Profile  Reply with Quote
case=5690 is fixed in build 1908
Go to Top of Page

wellental1
New Member

6 Posts

Posted - Jun 05 2012 :  4:21:35 PM  Show Profile  Reply with Quote
Just checked it out: Works like a charm!
Thanks!
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