http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58678
--- Comment #45 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to David Kredba from comment #44) > Hello Markus, > I moved it (deleted a three lines) from .h file and placed them to asource > file > a) beginning of source file after a namespace definition and it failed > with: > > /usr/include/qt4/QtCore/qmap.h:107:17: error: no match for 'operator<' > (operand types are 'const Calligra::Sheets::Conditions' and 'const > Calligra::Sheets::Conditions') > /usr/include/qt4/QtCore/qmap.h:107:17: error: no match for 'operator<' > (operand types are 'const Calligra::Sheets::Conditions' and 'const > Calligra::Sheets::Conditions') > > b) before the first occurence of qHash and it failed with: > > /usr/include/qt4/QtCore/qmap.h:107:17: error: no match for 'operator<' > (operand types are 'const Calligra::Sheets::Conditions' and 'const > Calligra::Sheets::Conditions') > /usr/include/qt4/QtCore/qmap.h:107:17: error: no match for 'operator<' > (operand types are 'const Calligra::Sheets::Conditions' and 'const > Calligra::Sheets::Conditions') > /usr/include/qt4/QtCore/qmap.h:107:17: error: no match for 'operator<' > (operand types are 'const Calligra::Sheets::Conditions' and 'const > Calligra::Sheets::Conditions') > > Could you please write me to what line to place it? > > Thank you in advance. You need to keep the declaration in Condition.h: bool operator<(const Conditions& conditions) const; and append the following to Condition.cpp: bool Conditions::operator<(const Conditions& conditions) const { return qHash(*this) < qHash(conditions); } But this is getting way off-topic.