diff options
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 4 | ||||
-rw-r--r-- | tests/auto/other/compiler/tst_compiler.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 2d9e0463b7..e324c043af 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -887,7 +887,8 @@ # endif /* VC 11 */ # if _MSC_VER >= 1800 /* C++11 features in VC12 = VC2013 */ -# define Q_COMPILER_DEFAULT_MEMBERS +/* Implemented, but can't be used on move special members */ +/* # define Q_COMPILER_DEFAULT_MEMBERS */ # define Q_COMPILER_DELETE_MEMBERS # define Q_COMPILER_DELEGATING_CONSTRUCTORS # define Q_COMPILER_EXPLICIT_CONVERSIONS @@ -905,6 +906,7 @@ # endif /* VC 12 SP 2 RC */ # if _MSC_VER >= 1900 /* C++11 features in VC14 = VC2015 */ +# define Q_COMPILER_DEFAULT_MEMBERS # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF // Partial support, insufficient for Qt diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp index 8cd25bf164..941514b206 100644 --- a/tests/auto/other/compiler/tst_compiler.cpp +++ b/tests/auto/other/compiler/tst_compiler.cpp @@ -875,11 +875,14 @@ void tst_Compiler::cxx11_default_members() }; class DefaultMembersChild: public DefaultMembers { + DefaultMembersChild(const DefaultMembersChild &) : DefaultMembers() {} public: DefaultMembersChild():DefaultMembers() {}; + DefaultMembersChild(DefaultMembersChild &&) = default; }; DefaultMembersChild dm; - Q_UNUSED(dm); + DefaultMembersChild dm2 = std::move(dm); + Q_UNUSED(dm2); #endif } |