News for hackers. Stuff that matters.
Re:Final features of C++17 by im3w1l on Saturday July 02, 2016 @06:02AM (#12021994)
Doesn't you code assume that there is exactly one derived class, and that the base class knows the name of it?
Re:Final features of C++17 by Kristine1975 on Saturday July 02, 2016 @07:32AM (#12022153)
The base class must be a template with one parameter being the derived class:

  template <typename D>
  class Base {
    ...
  };
and then:

  class Derived: public Base<Derived> {
    ...
  };
This is called the https://en.wikipedia.org/wiki/Curiously_recurring_template_p...