#include template class basic { public: void sent() { get_T().sent(); } private: T& get_T(){return static_cast(*this);} friend T; }; class sent_to_screen:public basic { public: void sent() { std::cout<<"hello world"< hello; hello.sent(); }