A followup to this question : [C++ : Is there a good way to choose between 2 implementations?](https://stackoverflow.com/questions/70699881/c-is-there-a-good-way-to-choose-between-2-implementations)

My goal here is that both of these classes can be called at the same runtime. So Polymorphism would be a good and easy way to go with.

I have the following diagram :
[![enter image description here](https://i.stack.imgur.com/arhqd.png)](https://i.stack.imgur.com/arhqd.png)

But the problem here is that each one of them(a.cpp/h and a\_mockup.cpp/h) uses the singelton pattern(contains static functions) and static functions cannot be virtually declared in the baseclass.

Is there a way to solve this problem?