summaryrefslogtreecommitdiff
path: root/src/utils/cpp/path_hash.hpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-08-29 14:20:58 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-10-17 10:25:08 +0200
commit138c6caba889aaf8d5cf6a9e7c9a5fce4787d33f (patch)
tree897810a7b8062f5969f6490387d09f2ad2e93521 /src/utils/cpp/path_hash.hpp
parentf2de9d8c9fe95d26c489cf674d37a8377e74a74f (diff)
downloadjustbuild-138c6caba889aaf8d5cf6a9e7c9a5fce4787d33f.tar.gz
utils: No hash for upcoming libstdc++ 11 releases
(cherry-picked from 82e0bd818aee1ca8751e0abf20455af88cc513bf)
Diffstat (limited to 'src/utils/cpp/path_hash.hpp')
-rw-r--r--src/utils/cpp/path_hash.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/cpp/path_hash.hpp b/src/utils/cpp/path_hash.hpp
index eaf988ec..0f3910f2 100644
--- a/src/utils/cpp/path_hash.hpp
+++ b/src/utils/cpp/path_hash.hpp
@@ -17,12 +17,13 @@
#include <filesystem>
-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 \
+// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
+#define GLIBCXX_11_4 20230528 // gcc/DATESTAMP of version 11.4
+#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12 and \
+ !(_GLIBCXX_RELEASE == 11 and __GLIBCXX__ >= GLIBCXX_11_4)) or \
(defined(_LIBCPP_VERSION) and _LIBCPP_VERSION < 16000)
// std::hash<std::filesystem::path> is missing for
-// - GNU's libstdc++ < 12 (except 11.4)
+// - GNU's libstdc++ < 11.4
// - LLVM's libcxx < 16 (see https://reviews.llvm.org/D125394)
namespace std {
template <>