Compile-time Polymorphism in SV

In reply to run2prem:

Function overloading would be calling different implementations of a function based on the signature alone. Your code calls Derived::add based on the type of class variable d_obj. You must call it with 3 arguments. This is because add is not a virtual method.