Don't wrongly detect libstdc++ 6.4 as >= 7
6.4 has been release after 20170502 but still throws ios_base::failure with old ABI. It is not a good idea to use the timestamp to distinguish release versions. Note that _GLIBCXX_RELEASE is not defined in older GCC versions. But if the macro is not present, we also know that it will throw the old version.
This commit is contained in:
parent
557856dc5c
commit
51e87f3740
|
@ -4,7 +4,7 @@
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
// ensure the old ABI is used under libstd++ < 7 and the new ABI under libstd++ >= 7
|
// ensure the old ABI is used under libstd++ < 7 and the new ABI under libstd++ >= 7
|
||||||
#if __GLIBCXX__ >= 20170502
|
#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7
|
||||||
#undef _GLIBCXX_USE_CXX11_ABI
|
#undef _GLIBCXX_USE_CXX11_ABI
|
||||||
#define _GLIBCXX_USE_CXX11_ABI 1
|
#define _GLIBCXX_USE_CXX11_ABI 1
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue