Fix building with -std=gnu++11 -stdlib=libstdc++ under OS X.

Take into account the possibility of using C++11 compiler with non-C++11
standard library as this may happen when targeting OS X < 10.7, in which case
C++11 libc++ can't be used.

Closes #16730.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-12-16 13:49:59 +00:00
parent 99d08bcc4b
commit 0795416871

View File

@ -3919,7 +3919,12 @@ wxDEFINE_ALL_COMPARISONS(const char *, const wxCStrData&, wxCMP_CHAR_CSTRDATA)
// Implement hashing using C++11 std::hash<>.
// ----------------------------------------------------------------------------
#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10)
// Check for both compiler and standard library support for C++11: normally the
// former implies the latter but under Mac OS X < 10.7 C++11 compiler can (and
// even has to be) used with non-C++11 standard library, so explicitly exclude
// this case.
#if (__cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10)) \
&& ( (!defined __GLIBCXX__) || (__GLIBCXX__ > 20070719) )
// Don't do this if ToStdWstring() is not available. We could work around it
// but, presumably, if using std::wstring is undesirable, then so is using