This is the mail archive of the
mailing list for the libstdc++ project.
Re: Include guard conflict
On Sunday 13 July 2003 14:01, Andreas Jaeger wrote:
> Jan Van Dijk <firstname.lastname@example.org> writes:
> > 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 C standard reserves all identifiers starting with _ for the C
> Library. I expect the C++ standard has similar wording. So - if C++
> has the same requirement -, using _VECTOR_H in one of your non-system
> libraries is out of the spec and your code code is broken.
Thanks for your quick reply. After your hint I started digging and indeed
found 126.96.36.199.2, which has wordings to that effect. Sorry for the fuzz, I'll
fix my code.
Jan van Dijk, Room 210
2 Chome 19-30, Mita Minato-ku
108 Tokyo, Japan
tel: +81 3 5476 9461 (home)