diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-09 05:25:58 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-09 20:53:06 +0200 |
commit | 71de8c0df57ddee94da71fab4a613f1df003a18f (patch) | |
tree | 3cd020aa8d72a2610e3396ce19d79c99455e2be3 /src/corelib/global | |
parent | e38ad9455099a83e2a8619f19ca949bc64ae6f82 (diff) |
Only define Q_COMPILER_INITIALIZER_LISTS for MSVC 12 SP 2
Nested initialization is broken before SP2, so just disable the whole
feature as tst_qvector crashes(release)/fails(debug)
Done-with: Jedrzej Nowacki
Task-number: QTBUG-38186
Change-Id: I9c5c9e55c75854fc1f05a59fab2ac7dce9b37fbb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 00f209ad6d..950647004a 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -827,13 +827,18 @@ # define Q_COMPILER_DELEGATING_CONSTRUCTORS # define Q_COMPILER_EXPLICIT_CONVERSIONS # define Q_COMPILER_NONSTATIC_MEMBER_INIT -# define Q_COMPILER_INITIALIZER_LISTS +// implemented, but nested initialization fails (eg tst_qvector): http://connect.microsoft.com/VisualStudio/feedback/details/800364/initializer-list-calls-object-destructor-twice +// #define Q_COMPILER_INITIALIZER_LISTS // implemented in principle, but has a bug that makes it unusable: http://connect.microsoft.com/VisualStudio/feedback/details/802058/c-11-unified-initialization-fails-with-c-style-arrays // #define Q_COMPILER_UNIFORM_INIT # define Q_COMPILER_RAW_STRINGS # define Q_COMPILER_TEMPLATE_ALIAS # define Q_COMPILER_VARIADIC_TEMPLATES # endif /* VC 12 */ +# if _MSC_FULL_VER >= 180030324 // VC 12 SP 2 RC +# define Q_COMPILER_INITIALIZER_LISTS +# endif /* VC 12 SP 2 RC */ + #endif /* Q_CC_MSVC */ #ifdef __cplusplus |