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

Adrian Vogelsgesang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 15 15:21:05 PDT 2022


avogelsgesang 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
 
----------------
Mordante wrote:
> 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.)
I have added a synopsis for `class path` now. Please let me know if this is what you had in mind


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