When should I write the keyword 'inline' for a function/method?

后端 未结 15 2451
清歌不尽
清歌不尽 2020-11-21 06:55

When should I write the keyword inline for a function/method in C++?

After seeing some answers, some related questions:

  • When should I <

15条回答
  •  走了就别回头了
    2020-11-21 07:14

    You still need to explicitly inline your function when doing template specialization (if specialization is in .h file)

提交回复
热议问题