[libcxx-commits] [PATCH] D125394: [libc++] Implement LWG3657

George Tokmaji via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 11 12:57:57 PDT 2022


Fulgen updated this revision to Diff 428749.
Fulgen added a comment.

Fixes according to review feedback


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125394

Files:
  libcxx/docs/Status/Cxx17Issues.csv
  libcxx/docs/Status/Cxx2bIssues.csv
  libcxx/include/__filesystem/path.h
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp


Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
@@ -9,7 +9,6 @@
 // UNSUPPORTED: c++03
 
 // <filesystem>
-// <functional>
 
 // class path
 
@@ -28,12 +27,12 @@
 //
 // template <class T>
 // struct hash
-//     : public unary_function<T, size_t>
 // {
 //     size_t operator()(T val) const;
 // };
 
 #include "filesystem_include.h"
+
 #include <functional>
 #include <type_traits>
 #include <vector>
Index: libcxx/include/__filesystem/path.h
===================================================================
--- libcxx/include/__filesystem/path.h
+++ libcxx/include/__filesystem/path.h
@@ -1019,21 +1019,17 @@
 
 _LIBCPP_END_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<_VSTD_FS ::path> : public unary_function<_VSTD_FS ::path, size_t> {
+struct _LIBCPP_TEMPLATE_VIS hash<_VSTD_FS ::path> {
 
-  _LIBCPP_INLINE_VISIBILITY
-  size_t operator()(const _VSTD_FS ::path& __val) const _NOEXCEPT { return _VSTD_FS ::hash_value(__val); }
+  _LIBCPP_HIDE_FROM_ABI
+  size_t operator()(const _VSTD_FS ::path& __val) const noexcept { return _VSTD_FS ::hash_value(__val); }
 };
 
 _LIBCPP_END_NAMESPACE_STD
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
 #endif // _LIBCPP_CXX03_LANG
 
 #endif // _LIBCPP___FILESYSTEM_PATH_H
Index: libcxx/docs/Status/Cxx2bIssues.csv
===================================================================
--- libcxx/docs/Status/Cxx2bIssues.csv
+++ libcxx/docs/Status/Cxx2bIssues.csv
@@ -155,7 +155,7 @@
 "`3649 <https://wg21.link/LWG3649>`__","[fund.ts.v2] Reinstate and bump ``__cpp_lib_experimental_memory_resource`` feature test macro","February 2022","",""
 "`3650 <https://wg21.link/LWG3650>`__","Are ``std::basic_string`` 's ``iterator`` and ``const_iterator`` constexpr iterators?","February 2022","|Nothing to do|",""
 "`3654 <https://wg21.link/LWG3654>`__","``basic_format_context::arg(size_t)`` should be ``noexcept`` ","February 2022","|Complete|","15.0","|format|"
-"`3657 <https://wg21.link/LWG3657>`__","``std::hash<std::filesystem::path>`` is not enabled","February 2022","",""
+"`3657 <https://wg21.link/LWG3657>`__","``std::hash<std::filesystem::path>`` is not enabled","February 2022","|Complete|","15.0","|filesystem|"
 "`3660 <https://wg21.link/LWG3660>`__","``iterator_traits<common_iterator>::pointer`` should conform to ยง[iterator.traits]","February 2022","|Complete|","14.0"
 "`3661 <https://wg21.link/LWG3661>`__","``constinit atomic<shared_ptr<T>> a(nullptr);`` should work","February 2022","",""
 "","","","",""
Index: libcxx/docs/Status/Cxx17Issues.csv
===================================================================
--- libcxx/docs/Status/Cxx17Issues.csv
+++ libcxx/docs/Status/Cxx17Issues.csv
@@ -315,6 +315,4 @@
 "","","","",""
 "`2901 <https://wg21.link/LWG2901>`__","Variants cannot properly support allocators","Toronto","|Complete|",""
 "`2955 <https://wg21.link/LWG2955>`__","``to_chars / from_chars``\  depend on ``std::string``\ ","Toronto","Resolved by `P0682R1 <https://wg21.link/P0682R1>`__",""
-"`2956 <https://wg21.link/LWG2956>`__","``filesystem::canonical()``\  still defined in terms of ``absolute(p, base)``\ ","Toronto","|Complete|",""
-"","","","",""
-"`3657 <https://wg21.link/LWG3657>`__","``std::hash<std::filesystem::path>`` is not enabled","","|Complete|",""
\ No newline at end of file
+"`2956 <https://wg21.link/LWG2956>`__","``filesystem::canonical()``\  still defined in terms of ``absolute(p, base)``\ ","Toronto","|Complete|",""
\ No newline at end of file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125394.428749.patch
Type: text/x-patch
Size: 3829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220511/9a3567d9/attachment.bin>


More information about the libcxx-commits mailing list