From fe8983f3444ca0f287d54d673ddda3aa9fb1a17c Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Sat, 14 Jan 2023 14:26:01 +0100 Subject: Minor fixes for compiling with clang-14 --- src/other_tools/root_maps/fpath_git_map.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/other_tools/root_maps/fpath_git_map.hpp') 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; +#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12) or \ + (defined(_LIBCPP_VERSION) and _LIBCPP_VERSION < 16000) +// std::hash is missing for +// - GNU's libstdc++ < 12 +// - LLVM's libcxx < 16 (see https://reviews.llvm.org/D125394) namespace std { template <> struct hash { @@ -30,6 +35,7 @@ struct hash { } }; } // namespace std +#endif [[nodiscard]] auto CreateFilePathGitMap( std::optional const& current_subcmd, @@ -37,4 +43,4 @@ struct hash { gsl::not_null 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 -- cgit v1.2.3