T O P I C R E V I E W |
Lostman |
Posted - Jun 16 2010 : 04:35:04 AM 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; }
-------------- |
4 L A T E S T R E P L I E S (Newest First) |
support |
Posted - Jun 01 2012 : 8:56:07 PM case=5690 is fixed in build 1908 |
accord |
Posted - Jun 18 2010 : 4:39:30 PM I have increased the priority on this for you, hopefully this will help. |
Lostman |
Posted - Jun 18 2010 : 05:36:51 AM Do you have plans on fixing this? I've searched for case number in the forum, the problem is several years old. |
accord |
Posted - Jun 16 2010 : 1:53:14 PM 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. |