[docs] Add description of other C++20 features to the overview

Task-number: QTBUG-128837
Pick-to: 6.9 6.8
Change-Id: I07731cd75c97c16eb008a76727b2ae831c029284
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
This commit is contained in:
Ivan Solovev 2024-11-22 17:21:26 +01:00
parent 1926df8d57
commit 82f6938d8a

View File

@ -56,4 +56,18 @@
implicitly converted into each other. However, there are some differences
between the classes. See the corresponding section in the
\l {span-STL} {QSpan class documentation} for more details.
\section1 Additional important features
Qt has also adopted a few more features from C++20, such as:
\list
\li \l Q_CONSTINIT macro that expands to the C++20 \c {constinit}
keyword, or to compiler-specific attributes if they are available
\li \l Q_NODISCARD_CTOR macro that expands to the \c {[[nodiscard]]}
attribute if the compiler supports \c {[[nodiscard]]} on
constructors
\li \l Q_NODISCARD_X and \l Q_NODISCARD_CTOR_X macros for
\c {[[nodiscard("reason")]]}
\endlist
*/