
On Mon, Apr 13, 2009 at 2:22 PM, Bo Persson <bop@gmb.dk> wrote:
Sid Sacek wrote:
Incredibuild (xoreax) and other parallel compilation systems have
[ Graham wrote: ] problems with pragma once
I'm not sure what the "problems with pragma once" are by Graham's statement above.
So far, I have heard that #pragma once doesn't work right on some platforms. That tells me the programmer cannot rely on it, but that doesn't indicate that it cannot be used in the program.
#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 ) # pragma once #endif
The thing is that it works for "platforms" where _MSC_VER is 1020, or somewhat higher than that. On platforms where _MSC_VER isn't defined, or where its value is significally higher that 1020, the include guards work just as well.
How much effort should we put into potentially optimizing compile time for some ancient compilers?
To answer this question, you must first measure the reduction in compile time you get for those ancient compilers. If nobody cares to do this, then it's a non-issue. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode