[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 Sep 8 14:25:16 PDT 2021


ldionne added inline comments.


================
Comment at: libcxx/include/CMakeLists.txt:96-98
   __bit_reference
+  __bit/bit_cast.h
   __bits
----------------
Quuxplusone wrote:
> Nit: `/` < `_` < `a` according to ASCII.
> But note that we get this wrong for `__functional_base` vs. `__functional/...` below. So if you take this nit, maybe fix both places; and/or maybe wonder are we historically sorting by something //other// than ASCIIbetically?
This is weird indeed, but I'm using VS Code's line sorting functionality. Will leave as-is since otherwise we'll just re-order stuff all the time because we use different sorts.


================
Comment at: libcxx/include/__bit/bit_cast.h:28
+  is_trivially_copyable_v<_FromType>
+>>
+_LIBCPP_HIDE_FROM_ABI
----------------
Mordante wrote:
> Would it make sense to use concepts instead of `_EnableIf`?
We generally use `enable_if` for `Constraints:` in the Standard, so I think I'd stick with that unless there is a benefit in using concepts here.


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