The general good practice is that trivial constructors, destructors, get/set functions, etc, can be directly defined inside a class definition in a header file, rather than providing their bodies in a cpp file. That makes them all implicitly inline.
But what if I need to make that trivial destructor virtual (anticipating that my class will be sub-classed in future)? Then my destructor becomes inline as well as virtual. But "inline" and "virtual" do not seem to go together, since virtual is resolved at run-time whereas "inline" is about directly pasting the code in the caller's code during compilation!
Please help me understand how a destructor becomes both virtual and inline at the same time!