diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2016-11-17 10:40:44 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2016-11-22 06:07:25 +0000 |
commit | 9f17c245893e296d5c92ed1ef1e5d08896b469b1 (patch) | |
tree | 553b464f3818ee8bc4f8492eab046b6311ca41f4 /src | |
parent | 38675e18fcc841228141568a2ecfafdeb99eba2a (diff) |
Enable constexpr support for Visual Studio 2017
Change-Id: I894789c41cc2c1a327c14d0526e658520d096085
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 3 | ||||
-rw-r--r-- | src/corelib/thread/qbasicatomic.h | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index e324c043af..25e6e4c6bf 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -931,6 +931,9 @@ # define Q_COMPILER_THREADSAFE_STATICS # define Q_COMPILER_UNIFORM_INIT # endif +# if _MSC_VER >= 1910 +# define Q_COMPILER_CONSTEXPR +# endif # endif /* __cplusplus */ #endif /* Q_CC_MSVC */ diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 7960174277..c1e01a3212 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -78,6 +78,9 @@ # error "Qt has not been ported to this platform" #endif +QT_WARNING_PUSH +QT_WARNING_DISABLE_MSVC(4522) + QT_BEGIN_NAMESPACE #if 0 @@ -340,4 +343,6 @@ public: QT_END_NAMESPACE +QT_WARNING_POP + #endif // QBASICATOMIC_H |