Benefits of inline functions in C++?

后端 未结 14 1408
终归单人心
终归单人心 2020-11-22 05:30

What is the advantages/disadvantages of using inline functions in C++? I see that it only increases performance for the code that the compiler outputs, but with today\'s opt

14条回答
  •  一生所求
    2020-11-22 06:03

    inline allows you to place a function definition in a header file and #include that header file in multiple source files without violating the one definition rule.

提交回复
热议问题