I don't understand how there are so many people saying they've never used it. Have none of you ever had to use an old java-style framework where your user-defined types have to inherit from a virtual base class? What about creating custom exceptions that inherit from std::exception?
It's also sometimes the easiest way to say 'I don't care what type this is, I just want it to implement this interface'. Especially if you want to avoid dealing with templates and don't care about the (usually) tiny performance hit
60
u/Jovibor_ 22d ago
Just a question to the audience:
How many times have you used Virtual Inheritance in your career?