locked
How to disable return value optimization in VS RRS feed

All replies

  • Hi wzh005313,

    Welcome to MSDN forum.

    I’m afraid, as far as I know, there isn’t any option to disable it in VS.

    I suggest if this feature is important for you, you could report this issue directly to Visual Studio product team from Help => Send Feedback => Suggest a Feature…

    In addition, though it’s an old thread, you could refer to this thread: How to disable return value optimization in Visual Studio 2010.

    Any feedback will be expected.

    Kind Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 20, 2020 9:03 AM
  • C++17 made RVO mandatory. A class may be returned by value even if it doesn't provide a copy or move constructor. A compiler that doesn't perform RVO would be non-conforming (aka buggy).

    Why do you feel the need to disable RVO? What actual problem are you trying to solve?


    Igor Tandetnik

    Saturday, March 21, 2020 1:41 PM
  • Hi wzh005313,

    Sorry to bother you.

    Do you have any update? Please feel free to contact us.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 27, 2020 10:30 AM