Is it possible to disable RVO (return value optimization) in Visual Studio 2010? Setting optimization flag to /Od (turns off all optimizations) doesn't help. In g++ there exists flag -fno-elide-constructors which disables RVO.
You cannot. It is just that simple. RVO/NRVO is Standard, and your code should not depend on it not being present.
Try to define your variable as volatile, maybe solves your problem. If it does not, you should send come code...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With