What is wrong with using inline functions?

后端 未结 12 1291
滥情空心
滥情空心 2020-11-29 01:51

While it would be very convenient to use inline functions at some situations,

Are there any drawbacks with inline functions?

Conclusion:

12条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 02:14

    Excessive inlining of functions can increase size of compiled executable which can have negative impact on cache performance, but nowadays compiler decide about function inlining on their own (depending on many criterias) and ignore inline keyword.

提交回复
热议问题