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
 1528: Template / inline type problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Erik Olofsson
Tomato Guru

111 Posts

Posted - Jul 05 2006 :  12:35:08 PM  Show Profile  Reply with Quote
This realy simple code doesn't work. Originally I was trying to reproduce a problem with two inline classes that is named the same. In that case members from an unrelated class would be shown when completing.

template <typename t_CData>
class TCVector0
{
public:
	t_CData &operator [](size_t _Index)
	{
		static t_CData Ret;
		return Ret;
	}
/*
	const t_CData &operator [](int _Index) const
	{
		static t_CData Ret;
		return Ret;
	}*/
};


class CTest0
{
public:
	class CKeyTest
	{
	public:
		int m_Member0;
	};

	TCVector0<CKeyTest> m_Members;
};


class CTest1
{
public:
	class CKeyTest
	{
	public:
		int m_Member1;
	};

	TCVector0<CKeyTest> m_Members;
};

int main()
{
	CTest0 Test0;
	CTest1 Test1;
	Test0.m_Members[0].m_; // Does not work
	Test1.m_Members[0].m_; // Does not work

	TCVector0<CTest0> TestVector;
	TestVector[0].m_; // Works
	return 0;
}

Cutting Edge Project Management
http://www.hansoft.se

Edited by - Erik Olofsson on Jul 05 2006 12:36:06 PM

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 06 2006 :  5:54:07 PM  Show Profile  Reply with Quote
which IDE and version of VA are you using?
using VS2003 and VA 1528 i have placed this code into a cpp file.

placing the caret after "m_" in the three marked places in main() and pressing CTRL-SPACE is inserting a member variable name for me. do you see this? are you seeing some other problem?

zen is the art of being at one with the two'ness
Go to Top of Page

Erik Olofsson
Tomato Guru

111 Posts

Posted - Jul 07 2006 :  10:26:49 AM  Show Profile  Reply with Quote
Visual Studio 2005 with VAX 1528

To reproduce: Clear caches and rebuild database.
Delete any files in vc8 dir in VAX install dir.
Create a new console project solution.
Put offending code there.

When I press Ctrl-space on the two first m_ I don't get any completion list at all.

The code below however "works". When I press ctrl-space at the first two I get m_Member3, but this is the wrong member.


template <typename t_CData>
class TCVector0
{
public:
	t_CData &operator [](size_t _Index)
	{
		static t_CData Ret;
		return Ret;
	}
/*
	const t_CData &operator [](int _Index) const
	{
		static t_CData Ret;
		return Ret;
	}*/
};


class CTest0
{
public:
	class CKeyTest
	{
	public:
		int m_Member0;
	};

	TCVector0<CKeyTest> m_Members;
};

class CTest1
{
public:
	class CKeyTest
	{
	public:
		int m_Member1;
	};

	TCVector0<CKeyTest> m_Members;
};

class CKeyTest
{
public:
	int m_Member3;
};

int main()
{
	CTest0 Test0;
	CTest1 Test1;
	Test0.m_Members[0].; // Displays wrong member
	Test1.m_Members[0].; // Displays wrong member

	TCVector0<CTest0> TestVector;
	TestVector[0].; // Works
	return 0;
}


Cutting Edge Project Management
http://www.hansoft.se
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 08 2006 :  3:40:06 PM  Show Profile  Reply with Quote
using the second set of code you posted i am seeing the same problems.

case=1607

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jul 14 2008 :  2:33:32 PM  Show Profile  Reply with Quote
case=1607 is fixed in build 1645

Whole Tomato Software, Inc.
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