News for hackers. Stuff that matters.
Re:Why should I have written ZeroMQ in C, not C++ (part II) by scott_s on Thursday August 30, 2012 @01:50PM (#4455823)
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;

There are no comments on this comment yet.