3 ms·
std::bit_cast is constexpr. I'd defer the switch case generation to the compiler though: https://godbolt.org/z/oaWvGzWcn https://godbolt.org/z/oaWvGzWcn Seems t
by gjye 4y ago
std::bit_cast is constexpr. I'd defer the switch case generation to the compiler though:
https://godbolt.org/z/oaWvGzWcn https://godbolt.org/z/oaWvGzWcn
Seems to do the trick with the bunch of cmp/je in the generated asm.