What happens if we make recursive functions inline?

I have doubts about the built-in functions. The built-in functions will not include function calls, but only the replacement of the function definition, wherever the call is performed by the built-in function. Internal user functions are enforced, unlike macros. What happens if recursive functions are done inline?

+6
source share
2 answers

"inline" is not a guarantee, this is a request.

A recursive inline function will not (usually) be inline.

  • As some commentators note, there are special cases (for example, the use of pragmas. Specific to the compiler) in which insertion is possible.
+4
source

inline is just a suggestion to the compiler and does not guarantee that the function will be inlined.

Obviously, the compiler cannot infinitely embed a recursive function. It may not be built into it at all, or it may take it several levels deep.

+5
source

All Articles