Home  >  Q&A  >  body text

内联函数 - C++中定义在类内的成员函数调用外部函数还是inline的吗?

定义在类内部的成员函数都是自动inline的,那么如果成员函数里调用了外部的函数,会怎样呢?
会将这个外部函数也内联展开,还是执行压栈保护现场这些操作来调用这个外部函数呢?

PHP中文网PHP中文网2765 days ago574

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:59:04

    Saying that a function is inline means that it will be expanded at the place where it is called (in other functions), rather than expanding calls to other functions within this function.

    reply
    0
  • Cancelreply