diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-14 18:36:15 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-13 05:11:34 +0100 |
commit | a670b916b09869867a213f7691a44d5b11d3cd0b (patch) | |
tree | 7331ed83e04c494d5af82741e64738693ab88afc /src/corelib/global | |
parent | ce1c53b4130495b17addc45bf3f5b2a2dc052507 (diff) |
Add the C++11 features supported by Visual Studio 2015
Tested with the November 2014 Preview.
There are three C++11 features that aren't supported as of MSVC2015:
- attributes
- constexpr
- uniform initialization
Microsoft recognizes that constexpr support in this compiler is partial,
so we don't enable it yet. Attributes are not implemented at all.
As for uniform initialization, Microsoft's feature list says
initalizer_list is supported, but we still see compile errors trying to
initialize arrays in constructor initialization lists.
Change-Id: Id686ccb6b4b2ecd63f16d308552174db1f05f2c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index dcd185742a..44356e6232 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -874,7 +874,24 @@ # if _MSC_FULL_VER >= 180030324 // VC 12 SP 2 RC # define Q_COMPILER_INITIALIZER_LISTS # endif /* VC 12 SP 2 RC */ - +# if _MSC_VER >= 1900 + /* C++11 features in VC14 = VC2015 */ +# define Q_COMPILER_ALIGNAS +# define Q_COMPILER_ALIGNOF +// Partial support, insufficient for Qt +//# define Q_COMPILER_CONSTEXPR +# define Q_COMPILER_INHERITING_CONSTRUCTORS +# define Q_COMPILER_NOEXCEPT +# define Q_COMPILER_RANGE_FOR +# define Q_COMPILER_REF_QUALIFIERS +# define Q_COMPILER_THREAD_LOCAL +# define Q_COMPILER_THREADSAFE_STATICS +# define Q_COMPILER_UDL +# define Q_COMPILER_UNICODE_STRINGS +// Uniform initialization is not working yet -- build errors with QUuid +//# define Q_COMPILER_UNIFORM_INIT +# define Q_COMPILER_UNRESTRICTED_UNIONS +# endif # endif /* __cplusplus */ #endif /* Q_CC_MSVC */ |