Click here to Skip to main content
15,503,845 members

Comments by iberg (Top 2 by date)

iberg 25-Oct-10 12:58pm View    
Deleted
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.
iberg 22-Jul-10 8:31am View    
Deleted
Vectors are guaranteed to be continuous:
http://www.parashift.com/c++-faq-lite/containers.html#faq-34.3