Hello,
I've been using std::string's == operator for years on windows and linux. Now I am compiling one of my libraries on linux, it uses == heavily. On linux the following function fails, because the == returns false even when the strings are equal (case sensitive wise equal)
const Data* DataBase::getDataByName( const std::string& name ) const
{
for ( unsigned int i = 0 ; i < m_dataList.getNum() ; i++ )
{
if ( m_dataList.get(i)->getName() == name )
{
return m_dataList.get(i);
}
}
return NULL;
}
The getName() method is declared as follows
virtual const std::string& getName() const;
I am building with gcc 4.4.1 and libstdc++44-4.4.1.
Any ideas? it looks perfectly valid to me.
Paul