Details
-
Epic
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
C++20 class-type NTTPs @ Qt
Description
C++20 added support for NNTPs (Non-Type Template Parameters) of class type, provided the type is
- literal
- only public members (incl. bases)
- has strong structural equality
- public op==() = default, and within the class body, and all non-static data members have strong structural equality, too, recursively
- no mutable or volatile members
It would be nice if e.g. QFlags was such a type (it currently isn't).
The C++20 semantics require such types to have public members. https://wg21.link/P2484 aims to remove this restriction, but it's not seen a revision since last year and won't be in C++23. We might need to wait until a version of that paper is accepted.
Attachments
Issue Links
- is required for
-
QTBUG-99243 Initiative: Qt and C++20
- Open
-
QTBUG-109363 Long term C++ plans post C++20
- Open
- relates to
-
QTBUG-103757 Impact of C++20 comparison on our code
- In Progress