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

QSet, QHash and other containers not initializer-list constructible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.1.0
    • 5.0.2
    • Core: Other
    • None
    • 45be71bf7d7c855e74b84d2fabb4e626afc57a22

    Description

      Qt's containers, apart from QList, QVector and QStringList, are not constructible using C++11 initializer lists.

      QList<int> l =

      {1,2,3}; // works
      QSet<int> s = {1,2,3}

      ; // doesn't work

      The equivalent standard containers are all constructible using initializer lists.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            seysayux Frank Erens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes