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 <eike.ziller@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-04-09 16:21:15 +02:00
parent a544ab672e
commit 3ee6f37e4b
2 changed files with 4 additions and 2 deletions

View File

@@ -28,7 +28,8 @@
#include <cstdio>
#include <vector>
#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

View File

@@ -31,7 +31,8 @@
#define QTC_FUNCTION_H
#include <functional>
#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