Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87973 Overload resolution noise from global operators and functions
  3. QTBUG-87976

Make equality operators in QtNetwork value types hidden friends

    XMLWordPrintable

    Details

    • Type: Technical task
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Network
    • Labels:
      None
    • Platform/s:
      All
    • Story Points:
      8
    • Commits:
      57e57d9bcda868abcfb552e1247b391162c0dff9 (qt/qtbase/dev)

      Description

      For the example in the main task, get rid of those candidates:

      [build] /Users/vohi/qt/dev/build/qtbase/include/QtNetwork/../../../../qtbase/src/network/kernel/qhostaddress.h:158:13: note: candidate function not viable: no known conversion from 'A' to 'QHostAddress::SpecialAddress' for 1st argument
      [build] inline bool operator ==(QHostAddress::SpecialAddress address1, const QHostAddress &address2)
      [build]             ^
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtNetwork/../../../../qtbase/src/network/access/qhstspolicy.h:92:23: note: candidate function not viable: no known conversion from 'A' to 'const QHstsPolicy' for 1st argument
      [build] Q_NETWORK_EXPORT bool operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs);
      [build]                       ^
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtNetwork/../../../../qtbase/src/network/access/qhttp2configuration.h:91:23: note: candidate function not viable: no known conversion from 'A' to 'const QHttp2Configuration' for 1st argument
      [build] Q_NETWORK_EXPORT bool operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs);
      [build]                       ^
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtNetwork/../../../../qtbase/src/network/ssl/qssldiffiehellmanparameters.h:66:23: note: candidate function not viable: no known conversion from 'A' to 'const QSslDiffieHellmanParameters' for 1st argument
      [build] Q_NETWORK_EXPORT bool operator==(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs) noexcept;
      [build]                       ^
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtNetwork/../../../../qtbase/src/network/ssl/qsslellipticcurve.h:90:23: note: candidate function not viable: no known conversion from 'A' to 'QSslEllipticCurve' for 1st argument
      [build] constexpr inline bool operator==(QSslEllipticCurve lhs, QSslEllipticCurve rhs) noexcept
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vhilshei Volker Hilsheimer
            Reporter:
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes