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

Revert "Revert "Prevent nonsensical comparations between OUString and nullptr_t""

This reverts commit e559c0c9; just turn the
deleted overloads into non-friend functions (and rely on any other overloads to
be still found via ADL).

Change-Id: I2af834162cab2e71ed9e32ae6903bc9f86d77ba2
Reviewed-on: https://gerrit.libreoffice.org/30441Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 4f30849f
......@@ -3226,6 +3226,18 @@ public:
}
};
#if defined LIBO_INTERNAL_ONLY
// Prevent the operator ==/!= overloads with 'sal_Unicode const *' paramter from
// being selected for nonsensical code like
//
// if (ouIdAttr == nullptr)
//
void operator ==(OUString const &, std::nullptr_t) = delete;
void operator ==(std::nullptr_t, OUString const &) = delete;
void operator !=(OUString const &, std::nullptr_t) = delete;
void operator !=(std::nullptr_t, OUString const &) = delete;
#endif
#if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
/// @cond INTERNAL
......
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