Using a function in a virtual class to determine a parameter

Methods declared inside classes always have automatic lifetimes. The static keyword in front of the function is a class member modifier indicating it is associated with the class type, not an instance(object) of the class.

See What is the exact difference between static tasks/functions and automatic tasks/functions ? please explain with a clear example - #2 by dave_59