[libcxx-commits] [PATCH] D146545: [libc++] Module fixes for __synth_three_way.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 7 09:53:43 PDT 2023


Mordante marked an inline comment as done.
Mordante added inline comments.


================
Comment at: libcxx/include/__compare/synth_three_way.h:28
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
-  []<class _Tp, class _Up>(const _Tp& __t, const _Up& __u)
-    requires requires {
-      { __t < __u } -> __boolean_testable;
-      { __u < __t } -> __boolean_testable;
-    }
-  {
-    if constexpr (three_way_comparable_with<_Tp, _Up>) {
-      return __t <=> __u;
-    } else {
-      if (__t < __u) return weak_ordering::less;
-      if (__u < __t) return weak_ordering::greater;
-      return weak_ordering::equivalent;
-    }
-  };
+// TODO MODULES restore the lamba to match the Standard.
+//_LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
----------------
ldionne wrote:
> Do we have a clang bug report for that? If not, let's make one and link it here.
Yes I've added the link to https://github.com/llvm/llvm-project/issues/57222


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146545



More information about the libcxx-commits mailing list