[libcxx-commits] [PATCH] D107036: [WIP] [libc++] [P1614] Various unimplemented parts of <compare>. [WIP]

Kent Ross via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 15 19:23:40 PDT 2021


mumbleskates added inline comments.


================
Comment at: libcxx/include/__compare/cmp_alg.h:66
+            // These two NaNs should be ordered by their payload bits,
+            // but there's no way to get at that information portably.
+            return _VSTD::signbit(__f) <=> _VSTD::signbit(__e);
----------------
I would hope that we can order them by union view of the data in memory if such a thing is allowed (or memcpy, if that's better) once we know that the sign and signaling bits are the same, because the specifics of the payload ordering are unspecified by totalOrder. Any way that we can look at the raw data in memory without UB should be sufficient.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107036



More information about the libcxx-commits mailing list