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

sizeof(QFlags<Enum>) should equal sizeof(Enum)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.8
    • Core: Other
    • None
    • All

    Description

      slightly related to QTBUG-111926

      Often enough, QFlags may not be particularly large. For example when 8 options is enough, the underlying enum type could just be a `std::uint8_t`. Wrapping the enum type in QFlags unfortunately results in an type four times as big! This is obviously wasteful! Instead, sizeof(QFlags<Enum>) == sizeof(Enum) should always hold.

      Attachments

        For Gerrit Dashboard: QTBUG-128105
        # Subject Branch Project Status CR V

        Activity

          People

            thiago Thiago Macieira
            swiftb0y Nikolaus Einhauser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change