logoalt Hacker News

TuxSHlast Tuesday at 9:45 AM1 replyview on HN

> But reinterpret_cast isn't valid in a constexpr scope.

std::bit_cast is


Replies

debugniklast Tuesday at 9:55 AM

Oh cool, and it behaves like memcpy, not like pointer aliasing! I'm stuck with C++14 at work so I missed that one.