This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
vector.h bug?
- To: egcs-bugs at cygnus dot com
- Subject: vector.h bug?
- From: "Theodore C. Belding" <Ted dot Belding at umich dot edu>
- Date: Tue, 13 Jan 1998 00:40:11 -0500
Hi-
I'm running egcs-1.0.1 under Redhat linux 5.0 on an i586 laptop. I've run
across what seems to me a bug in vector.h. Is this a known problem? Based
on Stroustrup's The C++ Programming Language (3rd ed.) and the SGI STL
docs, it seems to me like this should work. It compiles fine under gcc
2.7.2.3.
Here's the problem. When I compile the following program:
#include <vector.h>
int main() {
vector<int> v(2,1);
}
I get:
villiers:~/test$ /usr/local/egcs/bin/g++ main.cc
/usr/local/egcs/include/g++/stl_vector.h:113: no type named
`iterator_category' in `int'
/usr/local/egcs/include/g++/stl_vector.h:113: no type named `value_type' in
`int'
/usr/local/egcs/include/g++/stl_vector.h:113: no type named
`difference_type' in `int'
/usr/local/egcs/include/g++/stl_vector.h:113: no type named `pointer' in `int'
/usr/local/egcs/include/g++/stl_vector.h:113: no type named `reference' in
`int'
/usr/local/egcs/include/g++/stl_iterator.h: In function `{error}
iterator_category<int>(const int &)':
/usr/local/egcs/include/g++/stl_iterator.h:126: confused by earlier errors,
bailing out
villiers:~/test$
-Ted
--
Ted Belding Ted.Belding@umich.edu
University of Michigan Program for the Study of Complex Systems
http://www-personal.umich.edu/~streak/