This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

vector.h bug?


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/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]