Bug with const-templates

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Mon Feb 14 14:27:00 GMT 2000


> /usr/include/g++/stl_algobase.h:122: Internal compiler error 980521.

Thanks for your bug report. gcc-2.95.2 says

/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/stl_algobase.h: In method `struct pair<const Help,map<int,int,less<int>,allocator<int> > > & pair<const Help,map<int,int,less<int>,allocator<int> > >::operator =(const pair<const Help,map<int,int,less<int>,allocator<int> > > &)':
...
test.cc:23:   instantiated from here
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/stl_algobase.h:139: non-static const member `const class Help pair<const Help,map<int,int,less<int>,allocator<int> > >::first', can't use default assignment operator

so the bug has been fixed. The original problem is within your code:
elements of vectors must be copy-assignable; pairs containing const
elements are not copy-assignable.

Hope this helps,
Martin



More information about the Gcc-bugs mailing list