[libcxx-commits] [PATCH] D58004: Bit-casting object representations (p0476r2)

JF Bastien via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 9 11:56:03 PST 2019


jfb added a comment.

In D58004#1391846 <https://reviews.llvm.org/D58004#1391846>, @zoecarver wrote:

> Here is another idea, what if we treated fundamental types differently because they can be cast using c-style casting? Like this:
>
>        std::is_fundamental<_To>::value &&
>        std::is_fundamental<_Fm>::value,
>        _To
>   >::type
>    bit_cast(const _Fm &__src) noexcept
>    {
>        return (_To) __src;
>    }
>   


I don't think you'll need any of this once we have a builtin.


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

https://reviews.llvm.org/D58004





More information about the libcxx-commits mailing list