When do compilers inline C++ code?

前端 未结 11 1187
孤独总比滥情好
孤独总比滥情好 2020-11-29 08:07

In C++, do methods only get inlined if they are explicitly declared inline (or defined in a header file), or are compilers allowed to inline methods as they see

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 08:51

    Compiler optimize as he wants unless you spec the opposite.

提交回复
热议问题