Date: Wed, 27 Aug 2025 15:27:34 +0200
How would you distinguish reinterpret_cast from bit_cast?
Only the type (pointer or reference vs. value)?
-----Ursprüngliche Nachricht-----
Von:Henry Miller via Std-Proposals <std-proposals_at_[hidden]>
You want static_cast here not reinterpret_cast. If that is paper it should be revised. Reinterpret_cast has always been "hey compiler, trust me that these bits don't really mean what the type says they mean, treat them as this other type and shut up about it". Static_cast has always been you know how to treat these bits in a different way, so please apply that (error if you don't know how). In your example it makes no difference as the two types happen to have the same bits.
Received on 2025-08-27 13:38:34