Suppose I have the following:
int main() { SomeClass(); return 0; }
Without optimization, the SomeClass() constructor will be calle
I'm sure is 'SomeClass::SomeClass()' is not implemented as 'inline', the compiler has no way of knowing that the constructor/destructor has no side effects, and it will call the constructor/destructor always.