This is the mail archive of the
mailing list for the libstdc++ project.
Include guard conflict
- From: Jan Van Dijk <janvandijkinjapan at yahoo dot co dot jp>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 13 Jul 2003 21:35:46 +0000
- Subject: Include guard conflict
- Organization: TU/Eindhoven
- Reply-to: jan at etpmod dot phys dot tue dot nl
when I compiled my code with g++ (mainline) I got horrible errors. The problem
turned out to be the changed include guards of the file bits/stl_vector.h.
gcc-3.2 has: #ifndef __GLIBCPP_INTERNAL_VECTOR_H
wheras mainline uses: #ifndef _VECTOR_H
The latter was also used in my (numerical vector) header file, as a result its
contents were no longer included...
The same goes for all other bits/stl_*.h files.
This seems to contradict the manual, which promises that all macros
controlling the library start with _GLIBCPP_, see
Googling for 'include guard' 'libstdc++' did not help, so I pose this question
here: Is there any particular reason for this change? Is the usage of such
short names an accepted new policy? The risk of breaking use-code (like mine)
is clear and present...
I apologize if I have missed a previous discussion of this subject.
I hope to hear, thank you in advance,
Regards, Jan van Dijk.
Jan van Dijk, Room 210
2 Chome 19-30, Mita Minato-ku
108 Tokyo, Japan
tel: +81 3 5476 9461 (home)