Relative Content

Tag Archive for c++language-lawyer

Why is std::bit_cast allowed on pointers?

std::bit_cast is advertised as the safe alternative to type-punning via reinterpret_cast. However, I see very often that people just blindly replace reinterpret_cast with bit_cast and calls it a day: