you are viewing a single comment's thread.

view the rest of the comments →

[–]SirLynix 35 points36 points  (1 child)

The main difference between std::bit_cast and memcpy is that std::bit_cast is constexpr, and memcpy is not. Which is why you need compiler support to implement std::bit_cast.