Let\'s say I have the following class hierarchy:
template< class T > class TestBase { public: virtual T const & do_foo() = 0; }; template&l
It will not win any awards for it's beauty, but this piece of code works as expected, without the compiler complaining.
virtual int do_bar() { return ((TestBase *) this)->do_foo() + 1; }