From 3ee6f37e4b887b0b4eff69f0eedf424a07067f2b Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Wed, 9 Apr 2014 16:21:15 +0200 Subject: [PATCH] support the latest g++ on mac the latest g++ on mac is really clang with a compatibility frontend, and claims to be clang and support all the features clang does with -std=c++0x (which qmake by default passes in). But if you link libstdc++ (again the default) then the library has several gaps. Catch that. Change-Id: I8387f8fdcfc7639538e576a2e93b2301e07086cd Reviewed-by: Eike Ziller Reviewed-by: Fawzi Mohamed Reviewed-by: Nikolai Kosjar --- src/libs/3rdparty/cplusplus/TranslationUnit.h | 3 ++- src/libs/utils/function.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/3rdparty/cplusplus/TranslationUnit.h b/src/libs/3rdparty/cplusplus/TranslationUnit.h index d5682cd1b38..56280ab7b42 100644 --- a/src/libs/3rdparty/cplusplus/TranslationUnit.h +++ b/src/libs/3rdparty/cplusplus/TranslationUnit.h @@ -28,7 +28,8 @@ #include #include -#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) +#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) \ + || (defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)) #define USE_TR1 #endif diff --git a/src/libs/utils/function.h b/src/libs/utils/function.h index 70100ecadb3..0edc9b6029e 100644 --- a/src/libs/utils/function.h +++ b/src/libs/utils/function.h @@ -31,7 +31,8 @@ #define QTC_FUNCTION_H #include -#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) +#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) || \ + (defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)) #define USE_TR1 #endif