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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 14 07:23:16 PDT 2022


Mordante added inline comments.


================
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
 
----------------
avogelsgesang wrote:
> Mordante wrote:
> > Can you update the synopsis to make them friends?
> not sure where I should put them, if I change them to be friends.
> 
> The `path` class is only forward-declared in the synopsis.
> As friends, I should probably move them into the `path` class. 
> Does that mean, that I should simply delete the comparisons from the synopsis here, thereby being consistent with the other members of `path` which are also not shown in the synopsis?
Path has its own synopsis hidden in http://eel.is/c++draft/fs.class.path.general#6

We could add that to the main synopsis. We've done that in other places too, but not in a consistent fashion.
(I know updating the synopsis is a bit of a hassle.)


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