r/cpp • u/david-alvarez-rosa • Apr 23 '26
Devirtualization and Static Polymorphism
https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/
81
Upvotes
r/cpp • u/david-alvarez-rosa • Apr 23 '26
View all comments
Show parent comment
2
u/Potterrrrrrrr Apr 24 '26
You can also slap it on the class definition itself which is useful for preventing accidental inheritance of that class too, I quite like that.