Why #pragma optimize(“”, off)

前端 未结 4 1255
走了就别回头了
走了就别回头了 2021-02-04 03:16

I\'m reviewing a C++ MFC project. At the beginning of some of the files there is this line:

#pragma optimize(\"\", off)

I get that this turns o

4条回答
  •  南方客
    南方客 (楼主)
    2021-02-04 03:25

    I have used this exclusively to get better debug information in a particular set of code with the rest of the application is compiled with the optimization on. This is very useful when running with a full debug build is impossible due to the performance requirement of your application.

提交回复
热议问题