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

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

XMLWordPrintable

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

      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)
      

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

            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

              Created:
              Updated:

                There are no open Gerrit changes