[Types-sig] If I wasn't already...
Marcin 'Qrczak' Kowalczyk
qrczak@knm.org.pl
14 Mar 2001 17:24:33 GMT
Tue, 13 Mar 2001 19:04:50 -0800, Paul Prescod <paulp@ActiveState.com> pis=
ze:
> afraid of parameterized types, a warning I ran into today would
> convince me:
I once got a better one:
mico-c++ -Wall -I. -c serwer.cc -o serwer.o
serwer.cc: In method `void Firma_impl::usun(const char *)':
serwer.cc:92: `struct __rb_tree_iterator<pair<const basic_string<char,str=
ing_char_traits<char>,__default_alloc_template<true,0> >,Katalog *>,const=
pair<const basic_string<char,string_char_traits<char>,__default_alloc_te=
mplate<true,0> >,Katalog *> &,const pair<const basic_string<char,string_c=
har_traits<char>,__default_alloc_template<true,0> >,Katalog *> *>' has no=
member named `second'
serwer.cc:93: no matching function for call to `map<basic_string<char,str=
ing_char_traits<char>,__default_alloc_template<true,0> >,Katalog *,less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >,__default_alloc_template<true,0> >::erase (__rb_tree_iterator<pair<=
const basic_string<char,string_char_traits<char>,__default_alloc_template=
<true,0> >,Katalog *>,const pair<const basic_string<char,string_char_trai=
ts<char>,__default_alloc_template<true,0> >,Katalog *> &,const pair<const=
basic_string<char,string_char_traits<char>,__default_alloc_template<true=
,0> >,Katalog *> *> &)'
/usr/include/g++/stl_map.h:156: candidates are: map<basic_string<char,str=
ing_char_traits<char>,__default_alloc_template<true,0> >,Katalog *,less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >,__default_alloc_template<true,0> >::erase<string, Katalog *, less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >, alloc>(__rb_tree_iterator<pair<const basic_string<char,string_char=
_traits<char>,__default_alloc_template<true,0> >,Katalog *>,pair<const ba=
sic_string<char,string_char_traits<char>,__default_alloc_template<true,0>=
>,Katalog *> &,pair<const basic_string<char,string_char_traits<char>,__d=
efault_alloc_template<true,0> >,Katalog *> *>)
/usr/include/g++/stl_map.h:157: map<basic_string<char,str=
ing_char_traits<char>,__default_alloc_template<true,0> >,Katalog *,less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >,__default_alloc_template<true,0> >::erase<string, Katalog *, less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >, alloc>(const string &)
/usr/include/g++/stl_map.h:158: map<basic_string<char,str=
ing_char_traits<char>,__default_alloc_template<true,0> >,Katalog *,less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >,__default_alloc_template<true,0> >::erase<string, Katalog *, less<b=
asic_string<char,string_char_traits<char>,__default_alloc_template<true,0=
> > >, alloc>(__rb_tree_iterator<pair<const basic_string<char,string_char=
_traits<char>,__default_alloc_template<true,0> >,Katalog *>,pair<const ba=
sic_string<char,string_char_traits<char>,__default_alloc_template<true,0>=
>,Katalog *> &,pair<const basic_string<char,string_char_traits<char>,__d=
efault_alloc_template<true,0> >,Katalog *> *>, __rb_tree_iterator<pair<co=
nst basic_string<char,string_char_traits<char>,__default_alloc_template<t=
rue,0> >,Katalog *>,pair<const basic_string<char,string_char_traits<char>=
,__default_alloc_template<true,0> >,Katalog *> &,pair<const basic_string<=
char,string_char_traits<char>,
__default_alloc_template<true,0> >,Katalog *> *>)
make: *** [serwer.o] Error 1
But please don't judge static typing from bad examples like C++ or Java!
--=20
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZAST=CAPCZA
QRCZAK