I have a set of classes that implement the same business methods. I plan to use CRTP instead of virtual sending due to performance reasons. But I would like to keep the coding convenience in one interface, which comes with inheritance and virtual methods.
Is it good that my specialized classes inherit both from a template abstract class that uses CRTP to store common code and inherits from a pure virtual class, so I can create instances of each type, but it depends on my client code only on the interface? Even better, how can I use CRTP to provide a single interface for client code when there are multiple implementations?
source share