"ponce" wrote in message news:[email protected]...
I heard a story of a C++ gamedev team that would use type-punning to reduce code size. std::vector<void*> would be the only instantiation of std::vector + casts everywhere. That was for console binaries.
We had a similar thing in the compiler for a long time, with void* arrays underneath and a very thin (inlineable) typesafe wrapper on top. I met a lot of resistance when trying to change it to a fully templated struct, until benchmarking showed the performance difference was negligible.
