I was reading some articles on cplusplus.com and for kicks I read the template tutorial. At the very end of the section there is this paragraph:
Since no code is generated until a template is instantiated when required, compilers are prepared to allow the inclusion more than once of the same template file with both declarations and definitions in a project without generating linkage errors.
Does this mean that if I have a .h file with a templated class in it I don't need to have inclusion guards on it? I normally just put them in out of habbit and it is not going to change that. It just made me curious if this is something that compilers are allowed to do or if they have to do it, ie. is it standard? IMO inclusion guards should always be used so I don't know why they would want to allow you to get used to not doing it.