diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-22 16:00:06 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-25 16:53:47 +0200 |
commit | d9544394b036019cca6a8c3ae07203aa7c94c6b5 (patch) | |
tree | 312963364e71271df4e1533cecc72be1c1a6a0a1 /src/corelib/global/qglobal.h | |
parent | 9c706e25673ccbe9d154720ea3e659b27edea80d (diff) |
Extract header qtypetraits.h from qglobal.h
Task-number: QTBUG-99313
Change-Id: I6cb76607213ca5d64dec669a39e8a59e13b21497
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 09072b8b6d..01a4898132 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -158,13 +158,6 @@ noexcept(std::conjunction_v<std::is_nothrow_move_constructible<T>, std::is_nothr return old; } -// like std::to_underlying -template <typename Enum> -constexpr std::underlying_type_t<Enum> qToUnderlying(Enum e) noexcept -{ - return static_cast<std::underlying_type_t<Enum>>(e); -} - QT_END_NAMESPACE // We need to keep QTypeInfo, QSysInfo, QFlags, qDebug & family in qglobal.h for compatibility with Qt 4. @@ -188,6 +181,7 @@ QT_END_NAMESPACE #include <QtCore/qtdeprecationmarkers.h> #include <QtCore/qtranslation.h> #include <QtCore/qtresource.h> +#include <QtCore/qtypetraits.h> #include <QtCore/qversiontagging.h> #endif /* __cplusplus */ |