News for hackers. Stuff that matters.
Re:C++14: floats, bits, and constant expressions by twoodfin on Monday March 28, 2016 @08:34AM (#11373847)
Love this kind of hacking at the edges of the standard.

Which of the attempted schemes are legal (implementation-defined) C++ when used at runtime? All of them? I'm pretty sure the memcpy() approach has to be kosher, at least.

EDIT:

Don't have a copy of the standard handy, but cppreference[1] suggests using reinterpret_cast<> is UB.

[1] http://en.cppreference.com/w/cpp/language/reinterpret_cast

There are no comments on this comment yet.