
10 Apr
2009
10 Apr
'09
3:48 p.m.
Hi, On Fri, Apr 10, 2009 at 11:23 PM, Marcus Lindblom <macke@yar.nu> wrote:
I've seen benchmarks that say some compilers (gcc, msvc) are smart enough to recognize #ifndef/#endif and do the #pragma once equivalent. (i.e. there's no discernable performance difference.)
Sutter and Alexandrescu say the same in C++ Coding Standards Item #24, but with admonishment to keep all other code and comments in between to cater for less intelligent detection of include guards (whereas many header files in Boost have comments right at the top). Regards, Eugene Wee