[libcxx-commits] [PATCH] D108250: [libc++][spaceship] Implement std::tuple::operator<=>
Kent Ross via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 22 14:09:25 PDT 2021
mumbleskates added inline comments.
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp:107
+ typedef std::tuple<double> T2;
+ // Comparisons with NaN and non-NaN are non-constexpr in GCC, so both sides must be NaN
+ assert((T1(std::numeric_limits<float>::quiet_NaN()) <=> T2(std::numeric_limits<double>::quiet_NaN()))
----------------
Quuxplusone wrote:
> Throughout, please use `constexpr double nan = std::numeric_limits<double>::quiet_NaN();` for readability.
> This will eliminate many line-breaks.
> In the tests where you use both float and double nan, I think it's fine to just have the one variable, because `(float)nan` is still going to be a float-typed NaN value.
This is already done, to be clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108250/new/
https://reviews.llvm.org/D108250
More information about the libcxx-commits
mailing list