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

QtConcurrent::blockingMapped behavior changed since Qt5 if the output container does have a non-explit size c'tor

    XMLWordPrintable

Details

    • macOS, Windows
    • 5
    • bd1023a824 (qt/qtbase/dev) bd1023a824 (qt/tqtc-qtbase/dev) b9c52b2c99 (qt/qtbase/6.3) b9c52b2c99 (qt/tqtc-qtbase/6.3) b9c52b2c99 (qt/qtbase/6.3.1)
    • Team A Foundation Sprint 57

    Description

      Hi all,

      after switching from Qt5 to Qt6 QtConcurrent::blockingMapped produced wrong results for me when using it with an output container that lacked an explicit keyword.

      The attached code snipped illustrates the case.

      Without the explicit, the blockingMapped overload creates the output container with "OrderedReduce" as size parameter so the result has finally three elements instead of one.

      The attached code example will work without error. To reproduce the issue you need to remove the explicit in line 55. Without the explicit you can make the example work again when using blockingMappedReduced instead as in line 87 instead.

      Not sure if this is a bug in Qt since the explicit should be there in reasonably written container code, but as this was quite difficult to track down, I wonder if the overall situation could be improved. 

      Best regards,

      Maxim

       

      Attachments

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

        Activity

          People

            sonakur Sona Kurazyan
            hrabowski Maximilian Hrabowski
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes