Inconsistent definition of vector<bool> specialization

Matt Austern austern@isolde.engr.sgi.com
Tue Nov 23 12:07:00 GMT 1999


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


More information about the Libstdc++ mailing list