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

QFlags doesn't support large (> sizeof(int)) enums

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.9.0 FF
    • 6.5
    • Core: Other
    • None
    • 4bd703450 (dev), da4a6cf78 (dev), a017ee967 (dev), 7971dd213 (6.8), 0d26dc672 (dev), f85a17abe (dev), 21f04d5d2 (dev), 2effeb25c (dev), d41b87e06 (dev), 57a6e671d (dev), 094f7cab5 (dev)

    Description

      First caught in https://codereview.qt-project.org/c/qt/qtbase/+/35764, with plans to introduce support in 5.1. Then we removed indications of that plan in https://codereview.qt-project.org/c/qt/qtbase/+/54720 (not sure why, though).

      Unless we need a guarantee that QFlags<T> is the same size for all T, using underlying_type<T> instead of int for sizeof(T) > sizeof(int) seems like an easy way out.

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              fabiankosmale Fabian Kosmale
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: