CPlusPlus: Fix MSVC Debug build

Amends 011f62dfc255b73e9fc952fa35abbb8219856f8d

Change-Id: I33aea095341ee5e1cb38763cde04b567ea030986
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Cristian Adam
2021-06-03 16:06:39 +02:00
parent 5ec611b68e
commit df571577b6

View File

@@ -26,6 +26,14 @@
namespace CPlusPlus { namespace CPlusPlus {
// clang-cl needs an export for the subclass, while msvc fails to build in debug mode if
// the export is present.
#if defined(Q_CC_CLANG) && defined(Q_CC_MSVC)
#define CPLUSPLUS_EXPORT_SUBCLASS CPLUSPLUS_EXPORT
#else
#define CPLUSPLUS_EXPORT_SUBCLASS
#endif
template <typename Tptr> template <typename Tptr>
class CPLUSPLUS_EXPORT List: public Managed class CPLUSPLUS_EXPORT List: public Managed
{ {
@@ -76,7 +84,7 @@ public:
Tptr value; Tptr value;
List *next; List *next;
class CPLUSPLUS_EXPORT ListIterator class CPLUSPLUS_EXPORT_SUBCLASS ListIterator
{ {
List<Tptr> *iter; List<Tptr> *iter;