[libcxx-commits] [PATCH] D130859: [libc++] Implement `operator<=>` for `filesystem::path`

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 13 04:39:15 PDT 2022


Mordante added a comment.

SGTM modulo some nits.



================
Comment at: libcxx/include/filesystem:28
+    bool operator>=(const path& lhs, const path& rhs) noexcept;             // removed in C++20
+    strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept; // C++20
 
----------------
Can you update the synopsis to make them friends?


================
Comment at: libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp:134
+      ASSERT_NOEXCEPT(p1 <=> p2);
+#endif
     }
----------------
Maye use the test macros.


================
Comment at: libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp:134
+      ASSERT_NOEXCEPT(p1 <=> p2);
+#endif
     }
----------------
Mordante wrote:
> Maye use the test macros.
Can you test for the proper return type too?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130859



More information about the libcxx-commits mailing list