May 2017
Intermediate to advanced
590 pages
17h 18m
English
To implement the curiously recurring template pattern in order to achieve static polymorphism, do the following:
template <class T> class control { public: void draw() { static_cast<T*>(this)->erase_background(); static_cast<T*>(this)->paint(); } };
class button : public control<button> { public: void erase_background() { std::cout ...Read now
Unlock full access