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

Kent Ross via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 22 13:56:17 PDT 2021


mumbleskates added inline comments.


================
Comment at: libcxx/include/__utility/pair.h:332
+{
+    if (auto __c = _VSTD::__synth_three_way(__x.first, __y.first); __c != 0) return __c;
+    return _VSTD::__synth_three_way(__x.second, __y.second);
----------------
Mordante wrote:
> Please place `return __c;` on a new line. Not sure whether this contradicts @cjdb's comment, but in libc++ we normally don't put an `if` and a `return` on one line.
Yes this was written to be spelled exactly as it appears in the standard, so that does contradict.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107721



More information about the libcxx-commits mailing list