[libcxx-commits] [PATCH] D143452: [libc++] Implement LWG3657 std::hash<filesystem::path>

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 7 07:45:44 PST 2023


ldionne marked an inline comment as done.
ldionne added inline comments.


================
Comment at: libcxx/include/__filesystem/path.h:1092
+template <>
+struct hash<_VSTD_FS::path> : __unary_function<_VSTD_FS::path, size_t> {
+  _LIBCPP_HIDE_FROM_ABI size_t operator()(_VSTD_FS::path const& __p) const noexcept {
----------------
philnik wrote:
> I don't think we have to inherit from `unary_function` here, and I don't really see a point if we don't have to.
The `std::hash` base template is specified to have those members in C++17 even though they are deprecated. So to be strictly conforming, I think it's better to provide them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143452/new/

https://reviews.llvm.org/D143452



More information about the libcxx-commits mailing list