bug report (was Re: vector's at)

Thomas Holenstein thomas@hex.ch
Tue Sep 12 10:16:00 GMT 2000


 > 
 > so here is a small exmaple of the bug:
 > -------------------------
 > #include <queue>
 > #include <vector>

Yeah, I found the bug.  But I don't know enough to fix it properly.

<queue> includes <bits/std_queue.h> which includes
<bits/stl_vector.h>, but I don't see why.

Anyhow, including stl_vector.h means you must include
<bits/stl_range_errors.h> first, because there the appropriate macros
are defined (in this case __STL_THROW_RANGE_ERRORS)

I don't fix this because I don't know what your policy is.  I think,
we should clean the whole thing up and delete files like
<bits/stl_range_errors.h>, because we know g++ will accept our throws.

The easy fix is to add the line
#include <bits/stl_range_errors.h>
in <bits/std_queue.h> at line 29.

Thomas


More information about the Libstdc++ mailing list