When is “inline” ineffective? (in C)

前端 未结 12 629
鱼传尺愫
鱼传尺愫 2020-12-09 10:56

Some people love using inline keyword in C, and put big functions in headers. When do you consider this to be ineffective? I consider it s

12条回答
  •  遥遥无期
    2020-12-09 11:33

    The important thing about an inline declaration is that it doesn't necessarily do anything. A compiler is free to decide to, in many cases, to inline a function not declared so, and to link functions which are declared inline.

提交回复
热议问题