Include guard conflict
Jan Van Dijk
janvandijkinjapan@yahoo.co.jp
Sun Jul 13 12:41:00 GMT 2003
Hi all,
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
http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/howto.html#6
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.
--
Keio-Tsuushin Residence
Jan van Dijk, Room 210
2 Chome 19-30, Mita Minato-ku
108 Tokyo, Japan
jan@etpmod.phys.tue.nl
tel: +81 3 5476 9461 (home)
More information about the Libstdc++
mailing list