This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inconsistent definition of vector<bool> specialization


On Nov 23,  1:00pm, scott snyder wrote:

> There is a specialization for vector<bool> defined in ext/stl_bvector.h.
> This file is _not_ included by #include <vector>.
> (bits/std_vector.h has the commented-out line:
>
>   //#include <bits/stl_bvector.h> // 990503 bkoz, non-standard
> )
>
> However, the file bits/std_queue.h (which is included by <queue>)
> _does_ include ext/stl_bvector.h.
>
> Thus, if someone includes just <vector> and uses vector<bool>,
> he'll get the generic version.

That's wrong.  According to the C++ standard, including <vector>
is supposed to give you the vector<bool> specialization.

			--Matt

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]