Relative Content

Tag Archive for c++inheritancetypes

C++ Inherited functions returning self reference with derived type

I am trying to create a system where one base class has a bunch of functions, then derived classes can inherit it and add more functions. However, all of these functions return the this keyword and I need the return type in derived classes to be a pointer of their own class, not of the base class. What might be the best way of implementing this?