Details
-
Epic
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
-
None
-
C++20 consteval @ Qt
Description
TL;DR: uninteresting until we depend on C++20
C++20 added the consteval keyword, which marks up functions that can only be executed at compile time (https://en.cppreference.com/w/cpp/language/consteval). Note that the related if consteval (https://en.cppreference.com/w/cpp/language/if#Consteval_if) is not C++20, but C++23.
Until we can depend on C++20, all we could do is to hide the keyword behind a macro that falls back to the closest approximation in C++17, which is constexpr. But constexpr functions can also be called at runtime, while consteval ones can not, so we'd allow code to compile in C++17 that wouldn't compile in C++20. That's not useful, so we can't use consteval until all compilers support it.
Attachments
Issue Links
- is required for
-
QTBUG-99243 Initiative: Qt and C++20
- Open
-
QTBUG-109362 C++20 is mandatory for users of Qt (Phase III)
- Open