Details
-
Epic
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
C++20 <numbers> @ Qt
Description
C++20 added math constants to header <numbers> in the std::numbers namespace: http://eel.is/c++draft/numbers
The feature-test macro is __cpp_lib_math_constants.
There are the plain-named math constants (e, pi, sqrt2, etc), all of which are of type double, and there are the _v variable templates that hold template-argument-typed values of the corresponding constants.
There are two aspects to this:
- we have our own FP type (qfloat16, and there's talk of a qfloat128)
- we need to specialize the variable templates to work on qfloat16.
- we may want to backport std::numbers as q20::numbers to use around our code
Attachments
Issue Links
- is required for
-
QTBUG-99243 Initiative: Qt and C++20
- Open
-
QTBUG-109360 Use C++20 code with Qt (Phase I)
- Open