bug in STL

Thomas Devanneaux Thomas.Devanneaux@enst.fr
Thu Nov 12 17:04:00 GMT 1998


Hello,

I'm using egcs 1.1b on a linux box, and when compiling :

#include <string>
#include <vector>

typedef pair<const string,string> string_pair;

int main() {
    vector<string_pair> header;
    string_pair s("foo", "bar");
    header.insert(header.begin(), s);
}

I get an error message:

$ g++ -Wall -o e example.cc
/usr/local/include/g++/stl_algobase.h: In method `struct pair<const
basic_string<char,string_char_traits<char>,__default_alloc_template<true,0>
>,basic_string<char,string_char_traits<char>,__default_alloc_template<true,0>
> > & pair<const
basic_string<char,string_char_traits<char>,__default_alloc_template<true,0>
>,basic_string<char,string_char_traits<char>,__default_alloc_template<true,0>
> >::operator =(const struct pair<const
basic_string<char,string_char_traits<char>,__default_alloc_template<true,0>
>,basic_string<char,string_char_traits<char>,__default_alloc_template<true,0>
> > &)':
/usr/local/include/g++/stl_algobase.h:198: Internal compiler error
980521.
/usr/local/include/g++/stl_algobase.h:198: Please submit a full bug
report to `egcs-bugs@cygnus.com'.
$

I don't know if this bug has been corrected in recent snapshots.



Good luck, you're doing some great work !

Thomas.





More information about the Gcc-bugs mailing list