[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: template error in friend declaration



On Thu, May 10, 2007 at 10:20:42AM +0100, abdelkader belahcene wrote:
> Hi, Is it a bug ??
> I tried to compile a cpp program which ran correctly on previous
> release (sarge debian, gcc compiler 3 ), it gave errors, for the
> declaration  (even if I omit the symbols <> )
> 
> friend ostream & operator <<  <> (ostream & os, Vector  <T> & tab);
> 
> for other declaration ( not friend), the + operator,  it works !! here
> is a complete example with errors at the compilation step.
> If I omit the << operator, the program will run
> Thank you for help
I made size public and commented out the friends line.
then I did 'g++ test.cpp' and it worked.

-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|

Attachment: signature.asc
Description: Digital signature


Reply to: