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
 Problem with parsing: c++ macro, 10.6.1827
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Lostman
New Member

3 Posts

Posted - Jun 16 2010 :  04:35:04 AM  Show Profile  Reply with Quote
Hi.

VA does not parse correctly the following code.
It fails to find definition of TestFunc in line
int j = CLASS_B.TestFunc();

-----------

template <class T>
class Single
{
public:
Single()
{
m_t = NULL;
}

~Single()
{
delete m_t;
}

static T & Instance()
{
return *m_t;
}

private:
static T * m_t;
};

class B
{
public:
int TestFunc()
{
return 0;
}
};

class A
{
public:
B & getB()
{
return m_b;
}
B m_b;
};

A * Single<A>::m_t = NULL;

#define CLASS_B (Single<A>::Instance().getB())

int _tmain(int argc, _TCHAR* argv[])
{
int j = CLASS_B.TestFunc();
return 0;
}

--------------

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 16 2010 :  1:53:14 PM  Show Profile  Reply with Quote
VA does not recognizes the returning type of a template function:

case=5690

For now, you can turn on

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

as a workaround if you are using VS2005/2008/2010. It will only help with member listboxes, though.
Go to Top of Page

Lostman
New Member

3 Posts

Posted - Jun 18 2010 :  05:36:51 AM  Show Profile  Reply with Quote
Do you have plans on fixing this?
I've searched for case number in the forum, the problem is several years old.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 18 2010 :  4:39:30 PM  Show Profile  Reply with Quote
I have increased the priority on this for you, hopefully this will help.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jun 01 2012 :  8:56:07 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