Controls the omission of the copy constructor call for class return types if all return statements in a function return the same local class object.
#pragma opt_classresults on | off | reset
The following listing shows an example.
#pragma opt_classresults on struct X { X(); X(const X&); // ... }; X f() { X x; // Object x will be constructed in function result buffer. // ... return x; // Copy constructor is not called. }
This pragma does not correspond to any panel setting. By default, this pragma is on.