It:
static_cast<Window>(*this).onResize();
is the same:
{
Window w = *this;
w.onResize();
} // w.~Window() is called to destroy 'w'
The first line creates a copy of the subobject of the base class of the Windowobject SpecialWindowthat it points to this. The second line calls onResize()in this copy.
: Window::onResize() , this; Window::onResize() this, . , this, .
Window::onResize() , this, , :
Window::onResize();