vector<bool> bug in debug mode

Jonathan Wakely
Fri May 6 10:54:00 GMT 2005

On Thu, May 05, 2005 at 07:31:54PM +0100, Jonathan Wakely wrote:

> I think the attached patch should be applied to fix a problem in debug
> mode.
> I haven't got a reduced test case yet but it causes several failures
> in the Boost regression tests.
> _Bit_iterator_base refers to std::iterator without the qualification,
> which fails in debug mode since _Bit_iterator_base is in namesapce
> __gnu_norm but iterator is always in namespace std (even when
> _GLIBCXX_DEBUG is defined).
> This is a problem in 3.4, 4.0 and mainline. I'm testing now and will try
> to produce a minimal test case for the testsuite before I submit a real
> patch for review.

The error in the Boost tests seems to be due to "using namespace std;
using namespace boost;" before including <vector>

Although this is a bad idea and not recommended, it is technically legal
so debug mode should still work.  Qualifying iterator fixes the problem,
but I'm still trying to reduce the testcase from 10k lines to something


More information about the Libstdc++ mailing list