Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126659

New QMap.qHash leading to ambiguous calls

    XMLWordPrintable

Details

    • Windows
    • 798c23189 (dev), aefa42745 (6.8)
    • Foundation Sprint 110

    Description

      The new QMap::qHash introduced in Qt 6.8 causes compilation errors because it is ambiguous:

       QMap<int,int> map;
       size_t seed = 0;
       qHash(map, seed);
      

      Compiler error:

      Call to 'qHash' is ambiguous
      qhashfunctions.h:235:8: candidate function [with T = QMap<int, int>, $1 = true]
      qmap.h:796:5: candidate function [with M = QMap<int, int>, $1 = true]
      

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            docjambi Peter Droste
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes