That's interesting that it does devirtualise in practice, but I'm talking about whether it ought to be allowed to. The conclusion I reached is that it ought not to be, making the behaviour you demonstrated a compiler bug. With that said, it was a while ago, and I may have gotten the details wrong.