move freestanding friend function definitions out of class

This commit is contained in:
Günter Obiltschnig 2019-11-17 09:33:09 +01:00
parent d588f86961
commit 44c7d97d2e

View File

@ -65,20 +65,9 @@ public:
/// Returns a printable representation in the [<namespace>#]<name> form.
public:
friend bool operator < (const QName& x, const QName& y)
{
return x._ns < y._ns || (x._ns == y._ns && x._name < y._name);
}
friend bool operator == (const QName& x, const QName& y)
{
return x._ns == y._ns && x._name == y._name;
}
friend bool operator != (const QName& x, const QName& y)
{
return !(x == y);
}
friend bool operator < (const QName& x, const QName& y);
friend bool operator == (const QName& x, const QName& y);
friend bool operator != (const QName& x, const QName& y);
private:
std::string _ns;
@ -129,6 +118,24 @@ inline std::string& QName::prefix()
XML_API std::ostream& operator << (std::ostream&, const QName&);
inline bool operator < (const QName& x, const QName& y)
{
return x._ns < y._ns || (x._ns == y._ns && x._name < y._name);
}
inline bool operator == (const QName& x, const QName& y)
{
return x._ns == y._ns && x._name == y._name;
}
inline bool operator != (const QName& x, const QName& y)
{
return !(x == y);
}
} } // namespace Poco::XML