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

Enable constexpr for basic geometry types (QPoint, QSize,...)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.5.2
    • Core: Other
    • None
    • Windows

    Description

      A lot of geometry calculations and verifications can be done at compile time.

      It would be convenient to use the same types in such compile-time code as in runtime geometry calculations. Therefore, it would be useful to be able to create constexpr versions of

      • QPoint / QPointF
      • QSize /QSizeF
      • QRect /QRectF
      • QLine / QLineF
      • if feasible also QPolygon / QPolygonF

      At this time, I am not aware of any (current or upcoming) std types that could replace the above mentioned types in a constexpr-enabled way.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            asperamanca Robert Schimkowitsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes