What do people here use C++ Abstract Base Class constructors for in the field? I am talking about pure interface classes having no data members and no non-pure virtual members.
Can anyone demonstrate any idioms which use ABC constructors in a useful way? Or is it just intrinsic to the nature of using ABCs to implement interfaces that they remain empty, inline and protected?
Here’s an example, although it’s a contrived, uncommon example.
You might use it to keep a list of all instances:
More usually they’re just not declared at all! There’s no reason to declare them: