bit_cast status

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bit_cast status

will wray
std::bit_cast was added to the C++ 20 draft this summer:
http://eel.is/c++draft/bit.cast

What's the status for inclusion in libstdc++?
Does anyone have a patch or plans to implement it?
Are there any blockers or implementation issues?

Existing implementations use memcpy so are not constexpr.
The std version will need compiler help to be constexpr.

Thanks, Will
Reply | Threaded
Open this post in threaded view
|

Re: bit_cast status

Jonathan Wakely-4
On Mon, 29 Oct 2018 at 18:40, will wray <[hidden email]> wrote:
>
> std::bit_cast was added to the C++ 20 draft this summer:
> http://eel.is/c++draft/bit.cast
>
> What's the status for inclusion in libstdc++?
> Does anyone have a patch or plans to implement it?

Not as far as I know.

> Are there any blockers or implementation issues?

Just that it needs compiler help.

>
> Existing implementations use memcpy so are not constexpr.
> The std version will need compiler help to be constexpr.
>
> Thanks, Will