|
62 | 62 | # if defined(__cplusplus) && __cplusplus < 201103L
|
63 | 63 | # undef GFX_TIMSORT_USE_CXX11
|
64 | 64 | # endif
|
65 |
| -# ifdef __GLIBCXX__ |
| 65 | +# ifdef _GLIBCXX_RELEASE |
| 66 | + // This setting only got added in gcc 7.1, so its presence always |
| 67 | + // indicates a C++11-ready STL |
| 68 | +# elif defined(__GLIBCXX__) |
| 69 | + // Before 7.1, the only way to test the version of libstdc++ is the |
| 70 | + // __GLIBCXX__ date macro. However, it's not monotonically increasing |
| 71 | + // releases kepy being made from older branches. The best we can do is |
| 72 | + // to disallow any version that is definitely before gcc 5.1 (the first |
| 73 | + // version that had enough C++11 support for us) and then blacklist |
| 74 | + // dates that are known to correspond with non-working versions. |
| 75 | + // |
| 76 | + // Note this really only is a problem when mixing compilers and STL (i.e. |
| 77 | + // compiling using clang but using gcc's libstdc++) Otherwise we'll |
| 78 | + // correctly reject the gcc compiler if its too old later. |
66 | 79 | # if __GLIBCXX__ < 20150422
|
67 | 80 | # undef GFX_TIMSORT_USE_CXX11
|
68 | 81 | # endif
|
| 82 | +# if __GLIBCXX__ == 20150426 |
| 83 | +# undef GFX_TIMSORT_USE_CXX11 // gcc 4.8.4+patches shipped with Ubuntu LTS 14.04 |
| 84 | +# endif |
| 85 | +# if __GLIBCXX__ == 20150623 |
| 86 | +# undef GFX_TIMSORT_USE_CXX11 // gcc 4.8.5 |
| 87 | +# endif |
| 88 | +# if __GLIBCXX__ == 20150626 |
| 89 | +# undef GFX_TIMSORT_USE_CXX11 // gcc 4.9.3 |
| 90 | +# endif |
| 91 | +# if __GLIBCXX__ == 20160803 |
| 92 | +# undef GFX_TIMSORT_USE_CXX11 // gcc 4.9.5 |
| 93 | +# endif |
| 94 | +# elif defined(__GLIBCPP__) // *really* old version of libstdc++ |
| 95 | +# undef GFX_TIMSORT_USE_CXX11 |
69 | 96 | # endif
|
70 | 97 | # ifdef _LIBCPP_VERSION
|
71 | 98 | # if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) || defined(_LIBCPP_CXX03_LANG)
|
|
0 commit comments