qt5base-lts/tests/auto/other/compiler
Marc Mutz 2a6bea7a55 qcompilerdetection.h: retract Q_COMPILER_DEFAULT_MEMBERS for MSVC < 2015
Earlier versions of the compiler cannot default
move special member functions, even though we
also define Q_COMPILER_RVALUE_REFS for them.

Fix by retracting the less-often-used of the
two compiler feature defines.

Q_COMPILER_DEFAULT_MEMBERS is not used outside
QtBase in neither 5.6 nor 5.7 (5.8 is not
released at this time, so wasn't considered).
The same is true of the dependent macros
Q_COMPILER_DEFAULT_DELETE_MEMBERS and
Q_DECL_EQ_DEFAULT.

In QtBase, the three uses are:
1. in QAtomic*, where the user also requires
   Q_COMPILER_CONSTEXPR, which is not defined
   for any MSVC at this time,
2. for QEnableSharedFromThis, which is a class
   template with an alternative {} implementa-
   tion of the default constructor, and uncon-
   ditional user-defined copy special member
   functions.
3. The test of the corresponding functionality
   in tst_compiler, which this commit amends.

That means that neither of these two only uses
of the macro in Qt libraries are affected by
the change.

The reason we do this change, then, is that in
the future, we want to be able to more easily
restore move special member functions for
classes for which they are suppressed due to
user-defined dtors or copy special member
functions.

Change-Id: I6f88cad66d6b87a758231f16355c3bddae697b86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-03 05:11:40 +00:00
..
.gitignore Moved autotests in category 'other' into new directory structure 2011-09-09 09:36:41 +02:00
baseclass.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
baseclass.h Update copyright headers 2015-02-11 06:49:51 +00:00
compiler.pro Use correct test to add C++14 to the project configuration 2015-12-01 15:46:31 +00:00
derivedclass.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
derivedclass.h Update copyright headers 2015-02-11 06:49:51 +00:00
othersource.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
tst_compiler.cpp qcompilerdetection.h: retract Q_COMPILER_DEFAULT_MEMBERS for MSVC < 2015 2016-09-03 05:11:40 +00:00