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

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

XMLWordPrintable

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

      ... 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?

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

            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

              Created:
              Updated:
              Resolved: