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

Raul Tambre via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 20 04:44:18 PDT 2020


tambre added inline comments.


================
Comment at: libcxx/include/bit:368
+{
+    static_assert(sizeof(_ToType) == sizeof(_FromType));
+    static_assert(is_trivially_copyable_v<_ToType>);
----------------
ldionne wrote:
> Question: the spec has these as `Constraints:` -- I think it means these should be used to SFINAE out, not hard-error -- right?
Correct.

>From [structure.specifications] 3.1:

> Constraints: the conditions for the function’s participation in overload resolution.


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