Say that I have a C++ class with some fields with static storage duration, call it class A.
Is there some way to use inheritance to "inject" these static fields into classes which derive from class A? That is to say, if class B and class C derive from A, B and C will have the same static fields as the base class A, shared with all other instances of B and C, but operations on these fields within instances of B and C will be distinct to their respective subclasses, and not affect each other.