Use unordered_xxx classes detected by configure
When using configure, use the same family of hash sets/maps when building wxWidgets and the applications using it as doing otherwise results in ABI incompatibility.
This commit is contained in:
parent
6c7aaa9e95
commit
f6dddd9228
@ -378,11 +378,17 @@ typedef short int WXTYPE;
|
||||
#endif
|
||||
|
||||
/*
|
||||
If using configure, stick to the options detected by it even if different
|
||||
compiler options could result in detecting something different here, as it
|
||||
would cause ABI issues otherwise (see #18034).
|
||||
*/
|
||||
#ifndef __WX_SETUP_H__
|
||||
/*
|
||||
Check for C++11 compilers, it is important to do it before the
|
||||
__has_include() checks because at least g++ 4.9.2+ __has_include() returns
|
||||
true for C++11 headers which can't be compiled in non-C++11 mode.
|
||||
*/
|
||||
#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10)
|
||||
#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10)
|
||||
#ifndef HAVE_TYPE_TRAITS
|
||||
#define HAVE_TYPE_TRAITS
|
||||
#endif
|
||||
@ -392,7 +398,7 @@ typedef short int WXTYPE;
|
||||
#ifndef HAVE_STD_UNORDERED_SET
|
||||
#define HAVE_STD_UNORDERED_SET
|
||||
#endif
|
||||
#elif defined(__has_include)
|
||||
#elif defined(__has_include)
|
||||
/*
|
||||
We're in non-C++11 mode here, so only test for pre-C++11 headers. As
|
||||
mentioned above, using __has_include() to test for C++11 would wrongly
|
||||
@ -409,9 +415,10 @@ typedef short int WXTYPE;
|
||||
#if !defined(HAVE_TR1_UNORDERED_SET) && __has_include(<tr1/unordered_set>)
|
||||
#define HAVE_TR1_UNORDERED_SET
|
||||
#endif
|
||||
#endif /* defined(__has_include) */
|
||||
#endif /* defined(__has_include) */
|
||||
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __WX_SETUP_H__ */
|
||||
|
||||
/* provide replacement for C99 va_copy() if the compiler doesn't have it */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user