News for hackers. Stuff that matters.
Re:Why introduce `std::launder` rather than have the compile... by gpderetta on Tuesday January 25, 2022 @04:11AM (#30069835)
But, assuming header is a standard layout type, the following:

  header h;
  read((char*)&h, sizeof(h));
  get_destination(h).write((const char*)&h, sizeof(h));
Is well defined even under strict aliasing.

(agree about the two views being live at the same time and memcpy being suboptimal here).

There are no comments on this comment yet.