diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-05-25 16:11:11 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-05-31 15:21:02 +0200 |
commit | 9d30f04f8fb16643b470248b252654846a7126f7 (patch) | |
tree | a0d216e17a88bcf0f1f44340dfeca92e53e1d433 /src/other_tools/root_maps/fpath_git_map.hpp | |
parent | 26e7149fe8cc1be820ab35ebb6b92a683f9809bb (diff) | |
download | justbuild-9d30f04f8fb16643b470248b252654846a7126f7.tar.gz |
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.
Diffstat (limited to 'src/other_tools/root_maps/fpath_git_map.hpp')
-rw-r--r-- | src/other_tools/root_maps/fpath_git_map.hpp | 17 |
1 files changed, 1 insertions, 16 deletions
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<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> { - [[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<std::string> const& current_subcmd, gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, |