[libcxx-commits] [PATCH] D75960: [libc++] Implement C++20's P0476r2: std::bit_cast

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 13 07:59:17 PST 2021


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


================
Comment at: libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp:208
+// TODO: There doesn't seem to be a way to perform non-trivial correctness
+//       tests inside constexpr.
+constexpr bool basic_constexpr_test() {
----------------
zoecarver wrote:
> I assume this means you're against using `__builtin_bit_cast ` to test `std::bit_cast`? Fair enough. 
Yes, because `std::bit_cast` is implemented as a single call to `__builtin_bit_cast`. I feel like what we're actually testing here is in fact `__builtin_bit_cast` directly, not just `std::bit_cast`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75960



More information about the libcxx-commits mailing list