News for hackers. Stuff that matters.
Re:Why introduce `std::launder` rather than have the compile... by gpderetta on Saturday January 22, 2022 @04:41PM (#30041104)
The problem is that if you are bitcasting, say, from a memory buffer coming from a read() call it is very hard for the compiler to prove that bitcasted copy is the only live one, especially across function calls.

For small objects bitcast works just fine because the result end up in registers were you would have loaded the original objects anyway.

There are no comments on this comment yet.