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
 namespace and using declaration parser bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pwc
Tomato Guru

138 Posts

Posted - Jan 29 2008 :  1:34:14 PM  Show Profile  Reply with Quote
The following code seems to confuse the parser:


#include <map>
#include <string>

class CMyClass
{
public:
	void Reset() {}
};

class CMyContainer
{
public:
	void Reset();
private:
	std::map<std::string, CMyClass*> m_Items;
};

using namespace std;

void CMyContainer::Reset()
{
	map<string, CMyClass*>::iterator beg = m_Items.begin();
	map<string, CMyClass*>::iterator end = m_Items.end();
	while(beg!=end)
	{
		beg->second->Reset();
		++beg;
	}
	m_Items.clear();
}


The call "beg->second->Reset()" has Reset underlined. Also, typing beg-> doesn't offer any valid choices. If I change the declaration for "beg" to be fully namespace qualified (insert "std::" in front of map and string), then it works. The code compiles fine, so the parser should handle it.

Thanks

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jan 29 2008 :  4:35:46 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=11842

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

support
Whole Tomato Software

5566 Posts

Posted - Apr 10 2008 :  12:55:43 AM  Show Profile  Reply with Quote
case=11842 is fixed in build 1632
Go to Top of Page

pwc
Tomato Guru

138 Posts

Posted - Apr 10 2008 :  09:32:04 AM  Show Profile  Reply with Quote
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