diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-08-28 11:14:53 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-08-28 18:34:35 +0200 |
commit | 63847a04a3e245097b170196cbef3005078e2e7f (patch) | |
tree | bb1c906a0d6aad13eb2fb3fdc5b3216b74cdd927 /src/utils/cpp/path_hash.hpp | |
parent | 6db13ba3f77ecf38ec1b54d6607efbb016cefce4 (diff) | |
download | justbuild-63847a04a3e245097b170196cbef3005078e2e7f.tar.gz |
Fix path hash for libstdc++ bug-fix release 11.4
... std::hash<fs::path> was first implemented in libstdc++
version 12. However, that change was also backported to
bug-fix release 11.4, so we may not include our
reimplementation if that version is used.
(cherry picked from 8fb4a41a63e5d195c2463ce0bc75e9d41cc0c5be)
Diffstat (limited to 'src/utils/cpp/path_hash.hpp')
-rw-r--r-- | src/utils/cpp/path_hash.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils/cpp/path_hash.hpp b/src/utils/cpp/path_hash.hpp index b990161c..eaf988ec 100644 --- a/src/utils/cpp/path_hash.hpp +++ b/src/utils/cpp/path_hash.hpp @@ -17,10 +17,12 @@ #include <filesystem> -#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12) or \ +auto constexpr kGLIBCXX_11_4 = 20230528; // gcc/DATESTAMP of version 11.4 +#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12 and \ + __GLIBCXX__ != kGLIBCXX_11_4) or \ (defined(_LIBCPP_VERSION) and _LIBCPP_VERSION < 16000) // std::hash<std::filesystem::path> is missing for -// - GNU's libstdc++ < 12 +// - GNU's libstdc++ < 12 (except 11.4) // - LLVM's libcxx < 16 (see https://reviews.llvm.org/D125394) namespace std { template <> |