Fix gcc warning in bit_cast

This commit is contained in:
Nekotekina 2019-09-08 19:27:29 +03:00
parent 693d54553c
commit aaf1b4c668

View file

@ -96,7 +96,7 @@ namespace std
{
static_assert(sizeof(To) == sizeof(From), "std::bit_cast<>: incompatible type size");
To result;
To result{};
std::memcpy(&result, &from, sizeof(From));
return result;
}