diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-21 22:16:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-22 07:19:17 +0200 |
commit | 0c3e90d95c2c952265625bcff590599627114ec1 (patch) | |
tree | d1a06156b98af9f4cb42237176c87269dce86486 /external | |
parent | 41147e20029c80c4941ca81bc5dca3782bef5d94 (diff) |
Comparison between css::uno::WeakReference and css::uno::Reference
...causes overload resolution ambiguity in C++20, as observed with recent
Clang 10 trunk with -std=c++2a:
> sd/source/ui/framework/factories/BasicPaneFactory.cxx:327:39: error: use of overloaded operator '==' is ambiguous (with operand types 'css::uno::WeakReference<css::drawing::framework::XConfigurationController>' and 'const ::css::uno::Reference< ::css::uno::XInterface>')
> if (mxConfigurationControllerWeak == rEventObject.Source)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
> include/com/sun/star/uno/Reference.hxx:425:28: note: candidate function (with reversed parameter order)
> inline bool BaseReference::operator == ( const BaseReference & rRef ) const
> ^
> include/cppuhelper/weakref.hxx:106:19: note: candidate function
> bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const
An alternative would be to add overloads for combinations of
css::uno::WeakReference adn css::uno::Reference, but this was the only case of
such an ambiguity across the whole code base, such just resolve it with an
explicit .get().
Change-Id: I4689d5ffd4f8993cc1f9401d3c21b24f53f21ccd
Reviewed-on: https://gerrit.libreoffice.org/81282
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
0 files changed, 0 insertions, 0 deletions