-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using CRTP instead of standard polymorphism #13
Labels
enhancement
New feature or request
Comments
C++20 concepts would be even better. |
Best of both worlds: Better Code: Runtime Polymorphism - Sean Parent |
Thank you Tom, I will watch it and elaborate on this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A Curiously Recurring Template Pattern (CRTP) would probably be a better design choice instead of classic inheritance that makes use of virtual functions.
Advantage in the case of, e.g.
LinearSystem
andNonlinearSystem
(both of which areSystem
s):System
instances at runtime or to work with heterogeneous collections ofSystem
s.The text was updated successfully, but these errors were encountered: