When applied to header files, idempotence means that
multiple inclusions of the header file in a single
translation unit have the same effect as a single
Most header files are made idempotent using header
A supporting link:
The problem here, is that there is a header file, mem.h,
which is not designed to be idempotent, but which is
being externally wrapped in header guards.
I agree with you that the behaviour of header guards
is important here. However, string.h is only included once,
as is cstring. The relevant file that is included twice
string.h is a standard header in both the C and C++
languages. It is indeed deprecated in the C++ Standard.
However, when the C++ Standard says something is
"deprecated", it is still a requirement for the current
version of the Standard, but may not be included in a
future revision (this is stated in Appendix D, para 2
of the C++ Standard).
I previously posted the part of the C++ Standard that states
the required behaviour of string.h (D.5 para 1).