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