Details
-
Epic
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
C++20 aggregate-init @ Qt
Description
C++20 solved the problem that the likes of std::make_unique and std::make_shared cannot be used to create a non-default-constructed aggregate, because they use new T(~~~) when aggregates need new T{~~}. They solved it by allowing aggregate initialization to use parentheses instead of braces, such that new T(~~~) compiles even when T is an aggregate.
Once we can depend on C++20, I expect more classes to become simple structs as a result of this change, CTAD for aggregates (QTBUG-104152) and designated initializers (QTBUG-104153).
Attachments
Issue Links
- is required for
-
QTBUG-99243 Initiative: Qt and C++20
- Open
-
QTBUG-109361 C++20 is required for the development and building of Qt itself (Phase II)
- Open
- relates to
-
QTBUG-104153 Impact of C++20 designated initializers on our code
- Open
-
QTBUG-104152 Impact of C++20 CTAD on our code
- Open