internal compiler error 364 + STL function adaptors
Niall Smart
njs3@doc.ic.ac.uk
Fri May 29 14:40:00 GMT 1998
On May 29, 2:35pm, Christian Eckes wrote:
} Subject: internal compiler error 364 + STL function adaptors
> Hi,
>
> I have problems with this testprogram using stl's function adapters. Even if
> this pice of code is not valid, the compiler should tell me more than
> 'Internal compiler error 364'. It works with the simple call-by-value
> version but not with references or const-references as function arguments ...
The latest egcs-snapshot reports numerous errors with this code, it
does not ICE, that doesn't mean that it's correct though, please
verify.
[njs3@cnet0000 ~]$ g++ foo.cc
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h: In
instantiation of `binder2nd<pointer_to_binary_function<int &,int
&,bool> >':
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h:206:
instantiated from `bind2nd<pointer_to_binary_function<int &,int
&,bool>, int>(const pointer_to_binary_function<int &,int &,bool> &,
const int &)'
foo.cc:20: instantiated from here
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h:206:
cannot form type reference to reference type int &const during
template instantiation
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h: In
instantiation of `binder2nd<pointer_to_binary_function<int &,int
&,bool> >::binder2nd<pointer_to_binary_function<int &,int
&,bool>>(const pointer_to_binary_function<int &,int &,bool> &, int
&)':
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h:208:
instantiated from `bind2nd<pointer_to_binary_function<int &,int
&,bool>, int>(const pointer_to_binary_function<int &,int &,bool> &,
const int &)'
foo.cc:20: instantiated from here
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h:198:
cannot form type reference to reference type int &const during
template instantiation
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h: In
instantiation of `binder2nd<pointer_to_binary_function<int &,int
&,bool> >::operator ()<pointer_to_binary_function<int &,int
&,bool>>(int &) const':
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_algo.h:92:
instantiated from `find_if<int *,
binder2nd<pointer_to_binary_function<int &,int &,bool> >>(int *, int
*, binder2nd<pointer_to_binary_function<int &,int &,bool> >)'
foo.cc:20: instantiated from here
/homes/njs3/pub/cc/egcs-19980525/include/g++/stl_function.h:200:
cannot form type reference to reference type int &const during
template instantiation
niall
More information about the Gcc-bugs
mailing list