template class LoggingMsgSender: public MsgSender { public: ... // ctors, dtor, etc. void sendClearMsg(const MsgInfo& info) { write "before sending" info to the log; sendClear(info); // call base class function; // this code will not compile! write "after sending" info to the log; } ... };