From 53262b9b5b9cb536916f6d6e086a944cb17bb8d8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 19 Jun 2014 16:22:49 -0700 Subject: [PATCH] Only define the MSVC C++11 feature macros in C++ Don't define them if qcompilerdetection.h was compiled in C mode. Change-Id: I080b62ef7c68bb582e55e9e3a1dff4e6c1bb48bd Reviewed-by: Stephen Kelly Reviewed-by: Friedemann Kleint --- src/corelib/global/qcompilerdetection.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index f9f86fd74c..afbbaf8f2d 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -785,6 +785,7 @@ #endif #if defined(Q_CC_MSVC) && !defined(Q_CC_INTEL) +# if defined(__cplusplus) # if _MSC_VER >= 1400 /* C++11 features supported in VC8 = VC2005: */ # define Q_COMPILER_VARIADIC_MACROS @@ -843,6 +844,7 @@ # define Q_COMPILER_INITIALIZER_LISTS # endif /* VC 12 SP 2 RC */ +# endif /* __cplusplus */ #endif /* Q_CC_MSVC */ #ifdef __cplusplus