diff options
Diffstat (limited to 'include/rtl/ustring.hxx')
-rw-r--r-- | include/rtl/ustring.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 5c097656c917..ff6b834c22d3 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -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 |