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

Kent Ross via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 12 12:58:48 PDT 2022


mumbleskates added a comment.

i suspect we can ship this differential as-is without fiddling with `test_comparisons.h` any further, and any further changes we want to make to that file should be done in another differential.



================
Comment at: libcxx/include/variant:1645
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+  requires(three_way_comparable<_Types> && ...)
+_LIBCPP_HIDE_FROM_ABI constexpr common_comparison_category_t<compare_three_way_result_t<_Types>...>
----------------
it turns out this `three_way_comparable` concept requirement is far too strict and does not exist in the standard. all this operator needs to do is visit its children's `operator<=>`s, which is already performed by the return type.


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