
10 Apr
2009
10 Apr
'09
2:59 p.m.
Each one of them supports #pragma once. Is there any reason to wrap this pragma within #ifdefs? Are there any compilers out there today that don't support this #pragma?
Could we change this coding pattern so that it no longer looks like MSVC is being selfish?
[Edouard A.] In addition #pragma once may be faster than #ifndef/#endif because the compiler is not even going to open the file a second time to parse the #ifndef/#endif. ICC does support #pragma once as well. http://software.intel.com/en-us/articles/cdiag1782/ -- EA