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

[q20] Back-port std::numbers::e, etc

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Core: Other
    • None

    Description

      QTBUG-58083 asks for consistency in using the value of pi. One way to become consistent is to use C++20 std::numbers::pi or std::numbers::pi_v<T>. Since we can't depend on C++20, yet, it may be worthwhile to back-port this feature into q20.

      Note that q20::numbers::pi_v<qfloat16> should also work, which means we need to specialize the variable templates for qfloat16 in qfloat16.h in either namespace std::numbers or q20::numbers, depending on __cpp_lib_math_constants.

      q20::numbers::e_v<long double> is optional, but if it's absent, it must be documented as such:

      // like std::numbers (except no support for long double)
      

      Attachments

        Issue Links

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

          Activity

            People

              cnn Qt Core & Network
              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:

                Gerrit Reviews

                  There are no open Gerrit changes