A new function (instead of bit_cast) would be needed, if one wants to do that.
 

-----Ursprüngliche Nachricht-----
Von: Jan Schultke <janschultke@googlemail.com>
Gesendet: Fr 16.01.2026 16:35
Betreff: Re: [std-proposals] Fixing std::bit_cast padding bit issues
An: std-proposals@lists.isocpp.org;
CC: Sebastian Wittmeier <wittmeier@projectalpha.org>;
 

I think the only solution is to create or use wider types, where the padding bits are part of the value representation.

 
How does that fix the problem of bit-casting long double to __int128? If the destination type was wider, you couldn't bit-cast (constraints not satisfied). The destination type has no padding bits, yet the cast is an alternative spelling for std::unreachable().