Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 namespace and using declaration parser bug

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
pwc Posted - Jan 29 2008 : 1:34:14 PM
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
3   L A T E S T    R E P L I E S    (Newest First)
pwc Posted - Apr 10 2008 : 09:32:04 AM
Thanks.
support Posted - Apr 10 2008 : 12:55:43 AM
case=11842 is fixed in build 1632
feline Posted - Jan 29 2008 : 4:35:46 PM
I am seeing the same effect here. Thank you for the clear description.

case=11842

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000