Will C++ linker automatically inline functions (without “inline” keyword, without implementation in header)?

前端 未结 8 1239
余生分开走
余生分开走 2021-02-07 06:42

Will the C++ linker automatically inline \"pass-through\" functions, which are NOT defined in the header, and NOT explicitly requested to be \"inlined\" through the

8条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 07:35

    Compiled code must be able to see the content of the function for a chance of inlining. The chance of this happening more can be done though the use of unity files and LTCG.

提交回复
热议问题