clang 10 error: use of overloaded operator '!=' is ambiguous

Luke Benes lukebenes at hotmail.com
Tue Oct 22 22:18:29 UTC 2019


clang version 10.0.0 (https://github.com/llvm/llvm-project.git 8e050e41a4b1193592f9b4298f14935f5878ae5f / r375496)

 is failing with the following new errors:

[CXX] vcl/unx/generic/gdi/salgdi.cxx
/core/vcl/unx/generic/gdi/salgdi.cxx:138:18: error: use of overloaded operator '!=' is ambiguous (with operand types 'SalX11Screen' and 'SalX11Screen')
    if( nXScreen != m_nXScreen )
        ~~~~~~~~ ^  ~~~~~~~~~~
/core/vcl/inc/unx/saltype.h:22:10: note: candidate function
    bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
         ^
/core/vcl/inc/unx/saltype.h:21:10: note: candidate function
    bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
         ^
/core/vcl/inc/unx/saltype.h:21:10: note: candidate function (with reversed parameter order)
1 error generated.
/core/solenv/gbuild/LinkTarget.mk:294: recipe for target '/core/workdir/CxxObject/vcl/unx/generic/gdi/salgdi.o' failed
make[1]: *** [/core/workdir/CxxObject/vcl/unx/generic/gdi/salgdi.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/core/vcl/unx/generic/window/salframe.cxx:2377:34: error: use of overloaded operator '!=' is ambiguous (with operand types 'SalX11Screen' and 'SalX11Screen')
        if( mpParent->m_nXScreen != m_nXScreen )
            ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
/core/vcl/inc/unx/saltype.h:22:10: note: candidate function
    bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
         ^
/core/vcl/inc/unx/saltype.h:21:10: note: candidate function
    bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
         ^
/core/vcl/inc/unx/saltype.h:21:10: note: candidate function (with reversed parameter order)
/core/vcl/unx/generic/window/salframe.cxx:2452:34: error: use of overloaded operator '!=' is ambiguous (with operand types 'SalX11Screen' and 'SalX11Screen')
        if( mpParent->m_nXScreen != m_nXScreen )
            ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
/core/vcl/inc/unx/saltype.h:22:10: note: candidate function
    bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
         ^
/core/vcl/inc/unx/saltype.h:21:10: note: candidate function
    bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
         ^
/core/vcl/inc/unx/saltype.h:21:10: note: candidate function (with reversed parameter order)
2 errors generated.
/core/solenv/gbuild/LinkTarget.mk:294: recipe for target '/core/workdir/CxxObject/vcl/unx/generic/window/salframe.o' failed
make[1]: *** [/core/workdir/CxxObject/vcl/unx/generic/window/salframe.o] Error 1
Makefile:282: recipe for target 'build' failed
make: *** [build] Error 2

False positive, suppress, or something that needs fixing?

-Luke


More information about the LibreOffice mailing list