Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CERT C++ Secure Coding StandardPRE00-CPP. Avoid defining macros
ISO/IEC TR 24772Pre-processor directives [NMP]
MISRA-CRule 19.7 (advisory): A function should be used in preference to a function-like macro

Bibliography

[Dewhurst 2002]Gotcha #26, "#define Pseudofunctions"
[FSF 2005]Section 5.34, "An Inline Function Is as Fast as a Macro"
[Kettlewell 2003] 
[Summit 2005]Question 10.4

...