I have a function:
static Bwah boo(){
Bwah bwah;
return bwah;
}
And a main function:
int main(){
Bwah boo = Assigner::boo();
cout << "got here.." << endl;
}
The destructor to Bwah is only called once, after the "got here" print. Is this guaranteed or is this a compiler optimization?