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

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 13 14:54:30 PST 2021


curdeius added inline comments.


================
Comment at: libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp:49
+    assert(std::memcmp(&from, &to, sizeof(T)) == 0);
+    assert(std::memcmp(&middle, &middle2, sizeof(Nested)) == 0);
+}
----------------
Not sure if this adds much value, but can't you additionally test `assert(from == middle.x);`?
Similarly for middle2.


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