summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/file_system/git_repo.hpp2
-rw-r--r--src/other_tools/root_maps/fpath_git_map.hpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/buildtool/file_system/git_repo.hpp b/src/buildtool/file_system/git_repo.hpp
index ecd3c776..fbb07aec 100644
--- a/src/buildtool/file_system/git_repo.hpp
+++ b/src/buildtool/file_system/git_repo.hpp
@@ -15,6 +15,8 @@
#ifndef INCLUDED_SRC_BUILDTOOL_FILE_SYSTEM_GIT_REPO_HPP
#define INCLUDED_SRC_BUILDTOOL_FILE_SYSTEM_GIT_REPO_HPP
+#include <functional>
+
#include "src/buildtool/file_system/git_cas.hpp"
/// \brief Git repository logic.
diff --git a/src/other_tools/root_maps/fpath_git_map.hpp b/src/other_tools/root_maps/fpath_git_map.hpp
index fdcc962c..7f772eff 100644
--- a/src/other_tools/root_maps/fpath_git_map.hpp
+++ b/src/other_tools/root_maps/fpath_git_map.hpp
@@ -21,6 +21,11 @@
/// \brief Maps the path to a repo on the file system to its Git tree WS root.
using FilePathGitMap = AsyncMapConsumer<std::filesystem::path, nlohmann::json>;
+#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12) or \
+ (defined(_LIBCPP_VERSION) and _LIBCPP_VERSION < 16000)
+// std::hash<std::filesystem::path> is missing for
+// - GNU's libstdc++ < 12
+// - LLVM's libcxx < 16 (see https://reviews.llvm.org/D125394)
namespace std {
template <>
struct hash<std::filesystem::path> {
@@ -30,6 +35,7 @@ struct hash<std::filesystem::path> {
}
};
} // namespace std
+#endif
[[nodiscard]] auto CreateFilePathGitMap(
std::optional<std::string> const& current_subcmd,
@@ -37,4 +43,4 @@ struct hash<std::filesystem::path> {
gsl::not_null<ImportToGitMap*> const& import_to_git_map,
std::size_t jobs) -> FilePathGitMap;
-#endif // INCLUDED_SRC_OTHER_TOOLS_ROOT_MAPS_FPATH_GIT_MAP_HPP \ No newline at end of file
+#endif // INCLUDED_SRC_OTHER_TOOLS_ROOT_MAPS_FPATH_GIT_MAP_HPP