Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • You example would also be undefined behavior if SUM would be a function. Commented Apr 24, 2014 at 14:17
  • Would be better to mention inline functions in the first paragraph and mention that they avoid call overhead. Commented Apr 24, 2014 at 15:14
  • @Potatoswatter My intention is to give a direct answer in the first paragraph to the question in the original post. And point out possible pitfalls, alternatives and other additional information in the following paragraph. Commented Apr 24, 2014 at 15:26
  • It's your prerogative. Personally, if an alternative is superior almost all the time due to such a serious pitfall of question topic, I'll give it top billing. Commented Apr 24, 2014 at 15:39
  • @Potatoswatter Good point. We are here not only to answer questions but also, more importantly, to share our experience. I will adopt this organization of answer when I try to answer a question next time. Thank you. Commented Apr 24, 2014 at 15:53