When should I write the keyword inline
for a function/method in C++?
After seeing some answers, some related questions:
When should I <
gcc by default does not inline any functions when compiling without optimization enabled. I don't know about visual studio – deft_code
I checked this for Visual Studio 9 (15.00.30729.01) by compiling with /FAcs and looking at the assembly code: The compiler produced calls to member functions without optimization enabled in debug mode. Even if the function is marked with __forceinline, no inline runtime code is produced.