C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fixing std::bit_cast padding bit issues

From: Jan Schultke <janschultke_at_[hidden]>
Date: Wed, 21 Jan 2026 18:41:12 +0100
> > Because the result of std::bit_cast has unspecified padding bits, so x =
>
> Unless we change std::bit_cast, which is what I am proposing.


It would be an ABI break if you changed that, and compilers would
essentially have to invent new ABI for all kinds of platforms to make this
work, so the std::bit_cast that you're proposing is practically
unimplementable.

Received on 2026-01-21 17:41:27