diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-04 18:13:32 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-02 23:10:55 +0000 |
commit | d775b1fcb3fc7bd41af37f5d0a4d999320b62364 (patch) | |
tree | b4fe9a26c57520c87d2082abe0883d0ff21938da /src/corelib/global/qflags.h | |
parent | 78a7e54f8f5c4ca6ce1ee6b0ac82c42b21738ac5 (diff) |
Remove handling of missing Q_COMPILER_INITIALIZER_LISTS
Change-Id: Id65b39c787235a051262544932e6717d076f1ea0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qflags.h')
-rw-r--r-- | src/corelib/global/qflags.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h index 65f4892472..bd3c219968 100644 --- a/src/corelib/global/qflags.h +++ b/src/corelib/global/qflags.h @@ -42,9 +42,7 @@ #ifndef QFLAGS_H #define QFLAGS_H -#ifdef Q_COMPILER_INITIALIZER_LISTS #include <initializer_list> -#endif QT_BEGIN_NAMESPACE @@ -121,10 +119,8 @@ public: Q_DECL_CONSTEXPR inline QFlags(Zero = nullptr) noexcept : i(0) {} Q_DECL_CONSTEXPR inline QFlags(QFlag flag) noexcept : i(flag) {} -#ifdef Q_COMPILER_INITIALIZER_LISTS Q_DECL_CONSTEXPR inline QFlags(std::initializer_list<Enum> flags) noexcept : i(initializer_list_helper(flags.begin(), flags.end())) {} -#endif Q_DECL_RELAXED_CONSTEXPR inline QFlags &operator&=(int mask) noexcept { i &= mask; return *this; } Q_DECL_RELAXED_CONSTEXPR inline QFlags &operator&=(uint mask) noexcept { i &= mask; return *this; } @@ -154,14 +150,12 @@ public: } private: -#ifdef Q_COMPILER_INITIALIZER_LISTS Q_DECL_CONSTEXPR static inline Int initializer_list_helper(typename std::initializer_list<Enum>::const_iterator it, typename std::initializer_list<Enum>::const_iterator end) noexcept { return (it == end ? Int(0) : (Int(*it) | initializer_list_helper(it + 1, end))); } -#endif Int i; }; |