inline virtual function

后端 未结 3 1033
萌比男神i
萌比男神i 2020-12-08 08:16

In C++, my understanding is that virtual function can be inlined, but generally, the hint to inline is ignored. It seems that inline virtual functions do not make too much

3条回答
  •  攒了一身酷
    2020-12-08 08:36

    You can have virtual functions as inline. The decision to make the function call inline is not just made at the compile time. It could be anytime between compilation to rutime. You can refer to this article from Herb Sutter. Inline Redux

提交回复
热议问题