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

As a user of Qt, I expect qfloat16 construction to be constexpr

    XMLWordPrintable

Details

    • User Story
    • Resolution: Out of scope
    • P2: Important
    • None
    • None
    • None
    • c86cf385d (dev), 2d4db1bff (6.5), 3a9bbf235 (6.6)

    Description

      ... but it isn't:

      contexpr qfloat16 f16 = 42.f; // ERROR: not a constant expression
      

      I realize that the conversion depends on some tables, but if consteval or std::is_constant_evaluated() may allow to have an alternative implementation that is constexpr. Maybe an algorithmic one that would be too slow for runtime?

      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
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews