C++ already allows such a thing using the "curiously recurring template pattern" (http://en.wikipedia.org/wiki/Curiously_recurring_template_pa...), often now called "mixins":
class person
{
protected:
int age;
int wieght;
};
template <class Base>
class people: public Base
{
private:
Base *prev;
Base *next;
};
people<person> plist;