This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: template buglet?


| 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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]