I intended to call a private class member function, but by a copy&paste mistake pasted the line as this function is declared in the header file:
void DebugView::on_cbYAxisEnabled_stateChanged(int)
{
void updateAxisEnabled();
}
instead of
void DebugView::on_cbYAxisEnabled_stateChanged(int)
{
updateAxisEnabled();
}
Surprisingly, the code was compiled and executed. However the method updateAxisEnabled()
was not executed.
So, why does it compile? Was here a local function declared within a method body or has void
instructed the compiler to ignore whatever comes afterwards?
The compiler is Visual Studio 2008.
P.S.: I'm aware of class declaration/definition within functions, but not functions within functions in C++.