[libcxx-commits] [PATCH] D131372: Implement std::variant::operator<=>

Adrian Vogelsgesang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 8 06:53:10 PDT 2022


avogelsgesang added inline comments.


================
Comment at: libcxx/docs/Status/SpaceshipProjects.csv:28
 | `[variant.monostate.relops] <https://wg21.link/variant.monostate.relops>`_","| monostate
-| variant",None,Kent Ross,|In Progress|
+| variant",None,Kent Ross,|Complete|
 | `[unique.ptr.special] <https://wg21.link/unique.ptr.special>`_,| `unique_ptr <https://reviews.llvm.org/D130838>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|
----------------
avogelsgesang wrote:
> please also update `monostate` and `variant` to link to this review
I updated the SpaceshipProjects.csv upstream to link a couple of in-flight reviews, also including this one. Please rebase on current `main`.


================
Comment at: libcxx/include/__variant/monostate.h:34
+inline _LIBCPP_INLINE_VISIBILITY
+constexpr strong_ordering operator<=>(monostate, monostate) noexcept { return strong_ordering::equal; }
+
----------------
avogelsgesang wrote:
> I usually try to keep the order between the synopsis and the implementation in sync.
> In this case, the synopsis has `operator<=>` after the removed comparisons. I think we should also use that order here in the implementation, i.e. switch the `#if` branches
Let's continue this discussion in https://reviews.llvm.org/D131363#inline-1263505


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131372



More information about the libcxx-commits mailing list