This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template buglet?
- To: nbecker at fred dot net
- Subject: Re: template buglet?
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Fri, 4 Sep 1998 03:20:12 +0200 (CEST)
- Cc: egcs at cygnus dot com (egcs at cygnus dot com)
| egcs-1.1a:
|
| template<class T>
| void Go (const T& first, const T& last);
|
| main() {
| char buf[256];
| Go (&buf[0], buf+strlen(buf));
| Go (buf, buf+strlen(buf));
| }
|
| g++ -g -c bug.cc
| bug.cc: In function `int main()':
| bug.cc:6: no matching function for call to `Go (char[256], char *)'
|
| The second call to Go() fails. Shouldn't the trivial conversion of
| char[] -> char* have been tried?
Hmm, I'd think so too. This seems related to a bug report I posted
earlier. There is some relation with http://www.cygnus.com/ml/egcs/1998-Aug/0162.html
I think. I am very interested in what the guru's have to say about this
(new) test case :).
--
Carlo Wood <carlo@runaway.xs4all.nl>