From 9d30f04f8fb16643b470248b252654846a7126f7 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 25 May 2023 16:11:11 +0200 Subject: utils: Relocate the std::filesystem::hash_value libc fix... ...and make the use of std::hash consistent. This will make it easier to remove the fix once the libc implementation we use catches up with the C++ standard. --- src/other_tools/root_maps/fpath_git_map.hpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (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 7f772eff..9b209163 100644 --- a/src/other_tools/root_maps/fpath_git_map.hpp +++ b/src/other_tools/root_maps/fpath_git_map.hpp @@ -17,26 +17,11 @@ #include "nlohmann/json.hpp" #include "src/other_tools/ops_maps/import_to_git_map.hpp" +#include "src/utils/cpp/path_hash.hpp" /// \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 { - [[nodiscard]] auto operator()( - std::filesystem::path const& ct) const noexcept -> std::size_t { - return std::filesystem::hash_value(ct); - } -}; -} // namespace std -#endif - [[nodiscard]] auto CreateFilePathGitMap( std::optional const& current_subcmd, gsl::not_null const& critical_git_op_map, -- cgit v1.2.3