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
11
u/Usual_Office_1740 Apr 23 '26
Deducing this feels like magic sometimes. Want to reduce code duplication for operator overloads or any member function that you want to write as both const or non const? How about free performance increases with less code? Deducing this to the rescue!