Source code
A handful of handy casts.
To
From
tl::
::
bit_cast
Casts the bit representation of from to a To. Use this instead of type punning through a union or reinterpret_cast. Essentially does:
To to; std::memcpy(&to, &from, sizeof(to));
E
underlying_cast
Casts an enumerator value to its underlying type.
SFINAE-friendly.