You're mixing something up here, it has nothing to do with any of that directly.
It is a hint to the compiler to inline the function (that is, to inject the function's code at the site of call), which is mostly ignored by modern compilers, since they use their own decision models.
The only place where you need this is when you want to define a non-template, non-class function in a header to avoid multiple definitions.
Note that a function generally must be defined in the header anyway so it can be inlined (this is not accounting for LTO).