diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-10-10 17:29:17 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-10-14 18:03:55 +0200 |
commit | 50481fb909c2bbbc26a193e23783e5b0151168b9 (patch) | |
tree | 46a9bc980af48e2e7e78e3e5c0891e427d42be8a /src/corelib | |
parent | 3478f6c4474e86f2431c22533dbffefb48af93a9 (diff) |
QEndian: do not use "raw" constexpr
Use the Qt's macros instead, since constexpr support may be revoked
on certain compilers.
Amends d26289ffb43a5fcf34e855db1dfbf42aa03c4f5a.
Change-Id: I62354b14b57ae5fcbf3f1186ddb48bcf26535e90
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qendian.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 615f523888..5cd9d3160b 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -327,9 +327,9 @@ public: return pre; } - static constexpr QSpecialInteger max() + static Q_DECL_CONSTEXPR QSpecialInteger max() { return QSpecialInteger(std::numeric_limits<T>::max()); } - static constexpr QSpecialInteger min() + static Q_DECL_CONSTEXPR QSpecialInteger min() { return QSpecialInteger(std::numeric_limits<T>::min()); } }; @@ -373,8 +373,8 @@ public: QLEInteger &operator ++(int); QLEInteger &operator --(int); - static constexpr QLEInteger max(); - static constexpr QLEInteger min(); + static Q_DECL_CONSTEXPR QLEInteger max(); + static Q_DECL_CONSTEXPR QLEInteger min(); }; template<typename T> @@ -400,8 +400,8 @@ public: QBEInteger &operator ++(int); QBEInteger &operator --(int); - static constexpr QBEInteger max(); - static constexpr QBEInteger min(); + static Q_DECL_CONSTEXPR QBEInteger max(); + static Q_DECL_CONSTEXPR QBEInteger min(); }; #else |