I am trying to find a way to access a function of the derived class through the base pointer without dynamic casting. I have tried the visitor pattern as suggested in this p