Is it possible to force a function not to be inlined?

前端 未结 9 650
攒了一身酷
攒了一身酷 2020-12-01 11:30

I want to force a little function not to be compiled as inline function even if it\'s very simple. I think this is useful for debug purpose. Is there any keyword to do this?

9条回答
  •  广开言路
    2020-12-01 12:17

    You can divide the class implementation between a header and cpp file. if you put the function outside of the class definition, your little function wont be inline.

提交回复
热议问题