Polymorphism
Static Polymorphism​
Function overloading and templates.
https://www.fluentcpp.com/2017/04/28/extract-interface-cpp/
Dynamic Polymorphism​
Base class vs std::variant
. When people say why OOP is so great, the biggest (hidden) argument is most often that polymorphism is great. But beware the confusion ! OOP is not the only way of achieving polymorphism ; generic programming with std::variant
is an option too.
Going further​
Going Further
Klaus Iglberger, Embrace No Paradigm Programming! (1h) Comparison of different approaches to achieve polymorphism