https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61421
--- Comment #9 from mimamer at gmail dot com --- Now that I have read enough about aliasing rules I realize that they are considerably fucked up and that their is no way to efficiently downcast without violating strict aliasing rules. In explanation, you need to copy your data out and back (which takes time), or implement an instance of a derived class in the first place (which consumes memory). Yes, my code is efficiency-critical. Hooray for retarded aliasing rules. (If I don't care about efficiency I could just as well switch to Java, which gives all the safety that one needs.)