As i see it the sole benefit of using external guards is to avoid opening a header file multiple times just for parsing the include guard. The same effect could be achieved with a "#pragma once" which should not require opening the file multiple times. However the project for which i ended up using the approach outlined here showed no sign of increased performance when using pragma once instead of classic include guards. The likely cause is that the preprocessor is already optimized in a way that it does not open a file multiple times even if internal include guards are used. If this is the case there should be no performance difference when using external guards cause this optimization is done by the preprocessor anyway.
Last Visit: 31-Dec-99 18:00 Last Update: 1-Jul-16 8:41