devirtualization happens at compile time
Huh how is that possible? What if you are passing a derived class to a function that accepts a base class argument? does it just emit 2 functions each with the different potential classes or something?