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

Make equality operators of QtCore containers hidden friends

    XMLWordPrintable

Details

    Description

      With the example in the main task, get rid of these candidates:

      [build] /Users/vohi/qt/dev/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qlist.h:860:35: note: candidate template ignored: could not match 'QList<type-parameter-0-0>' against 'A'
      [build] QTypeTraits::compare_eq_result<U> operator==(const QList<U> &l, const QList<U> &r)
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qvarlengtharray.h:630:35: note: candidate template ignored: could not match 'QVarLengthArray<type-parameter-0-0, Prealloc>' against 'A'
      [build] QTypeTraits::compare_eq_result<T> operator==(const QVarLengthArray<T, Prealloc1> &l, const QVarLengthArray<T, Prealloc2> &r)
      [build]                                   ^
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qmap.h:738:42: note: candidate template ignored: could not match 'QMap<type-parameter-0-0, type-parameter-0-1>' against 'A'
      [build] QTypeTraits::compare_eq_result<AKey, AT> operator==(const QMap<AKey, AT> &lhs, const QMap<AKey, AT> &rhs)
      [build]                                          ^
      [build] /Users/vohi/qt/dev/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qmap.h:1437:42: note: candidate template ignored: could not match 'QMultiMap<type-parameter-0-0, type-parameter-0-1>' against 'A'
      [build] QTypeTraits::compare_eq_result<AKey, AT> operator==(const QMultiMap<AKey, AT> &lhs, const QMultiMap<AKey, AT> &rhs)
      

      Attachments

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: