When should I write the keyword inline for a function/method in C++?
After seeing some answers, some related questions:
When should I <
Unless you are writing a library or have special reasons, you can forget about inline and use link-time optimization instead. It removes the requirement that a function definition must be in a header for it to be considered for inlining across compilation units, which is precisely what inline allows.
(But see Is there any reason why not to use link time optimization?)