3 ms·
And then there is C++. The C++ language allows temporary objects to be generated and/or optimized away. Those objects can have constructors and destructors wi
by kazinator 6y ago
And then there is C++.
The C++ language allows temporary objects to be generated and/or optimized away.
Those objects can have constructors and destructors with side effects, and those side effects appear or go away together with the object to which they are attached.
If your program depends on whether a temporary object does something or not, you are officially screwed.