O'Reilly logo
  • LI WEI thinks this is interesting:

Inline functions must have their bodies completely contained in the .h header file. This is so that the compiler can make optimizations and actually inline the function wherever it is used.

From

Cover of Learning C++ by Creating Games with UE4

Note

inline需要在头文件中包含函数体。这样编译器可以全局处理。