220.127.116.11.2 Global names [lib.global.names]
1 Certain sets of names and function signatures are always reserved to the implementation:
— Each name that contains a double underscore (_ _) or begins with an underscore followed by an uppercase
letter (2.11) is reserved to the implementation for any use.
So perhaps this inclusion guards could be changed to comply with the C++ standard? I know this is just a minor matter, but it wouldn't hurt to be as standard-compliant as possible, right?
This is standard. The quote is about the compiler, not the precompiler. #ifdef __ANYTHING is for the precompiler, while the quote is adressing only the compiler.
Concerning those who have never seen names collisions, I remember having such with directx with the directshow samples for example. Microsoft hid 2 files error.h with __ERROR__ defines inside. That was in 2009, and it could still be. Also I remember once or two copy paste errors on these (well it was quick to correct anyway, no big deal).
My point of view :
During long time I used #defines, but for the last 2 years I began using pragma because there are more arguments for it than against it :
1/ less error prone.
2/ vastly faster to preprocess (i remember a thread about these tests on the boost nabble). It is REALLY faster. Because most of the time, the precompiler knows that he does not need to re-open the .h (yes, that's the algorithm). Otherwise the precompiler opens the .h (<=> minimum 2 hdd accesses), and read that the precompiler-variable is already defined and does nothing with the file.
3/ easier to setup.
The case where pragma once is a problem are : when you use preprocessor programming with recurssive self inclusion of files. For example like with some of Boost.PP macros.
Now, if everything already work with #define in Ogre, I am not convinced there is so much to gain by suddenly changing the existing code base to use #pragma once; apart of course to gain some compilation speed.