Kaydet (Commit) e559c0c9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "Prevent nonsensical comparations between OUString and nullptr_t"

This reverts commit 2e3f5c8d, some GCC
have trouble with deleted friend functions; need to fix that properly.
üst 2e3f5c8d
...@@ -1588,17 +1588,6 @@ public: ...@@ -1588,17 +1588,6 @@ public:
friend bool operator != ( const sal_Unicode * pStr1, const OUString& rStr2 ) friend bool operator != ( const sal_Unicode * pStr1, const OUString& rStr2 )
{ return !(operator == ( pStr1, rStr2 )); } { return !(operator == ( pStr1, rStr2 )); }
#if defined LIBO_INTERNAL_ONLY
// Prevent the above overloads from being selected for nonsensical code like
//
// if (ouIdAttr == nullptr)
//
friend bool operator ==(OUString const &, std::nullptr_t) = delete;
friend bool operator ==(std::nullptr_t, OUString const &) = delete;
friend bool operator !=(OUString const &, std::nullptr_t) = delete;
friend bool operator !=(std::nullptr_t, OUString const &) = delete;
#endif
friend bool operator < ( const OUString& rStr1, const OUString& rStr2 ) friend bool operator < ( const OUString& rStr1, const OUString& rStr2 )
{ return rStr1.compareTo( rStr2 ) < 0; } { return rStr1.compareTo( rStr2 ) < 0; }
friend bool operator > ( const OUString& rStr1, const OUString& rStr2 ) friend bool operator > ( const OUString& rStr1, const OUString& rStr2 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment