This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Inconsistent definition of vector<bool> specialization
- To: scott snyder <snyder at fnal dot gov>, libstdc++ at sourceware dot cygnus dot com
- Subject: Re: Inconsistent definition of vector<bool> specialization
- From: "Matt Austern" <austern at isolde dot engr dot sgi dot com>
- Date: Tue, 23 Nov 1999 12:07:00 -0800
- References: <199911231900.NAA12201@d0sgibnl1.fnal.gov>
- Reply-to: austern at sgi dot com
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