template expansion bug or correct behaviour?
Alexandre Oliva
oliva@dcc.unicamp.br
Mon Dec 8 12:17:00 GMT 1997
Dave MacDonald writes:
> ~/tst# c++ -DSHOWERROR projdesc.cc
> projdesc.cc: In function `int main(int, char **)':
> projdesc.cc:26: no matching function for call to `HashTable<const char
> *,int>::HashTable (int ()(const char *&, int), bool ()(const char *&,
> const char *&))'
> projdesc.cc:26: candidates are: HashTable<const char
> *,int>::HashTable(const HashTable<const char *,int> &)
> projdesc.cc:6: HashTable<const char
> *,int>::HashTable(int (*)(const char *const &, int), bool (*)(const char
> *const &, const char *const &))
> Is it a bug, or proper C++ (according to the new standard)?
egcs is correct. int (*)(const char *const&, int) and int(*)(const
char *&, int) are not the same type, nor are they interchangeable.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list