www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/21/10:04:03

From: pavenis AT lanet DOT lv
Message-ID: <B0000102620@stargate.astr.lu.lv>
To: Jari Karppinen <jakarppi AT mail DOT student DOT oulu DOT fi>, djgpp AT delorie DOT com
Date: Tue, 21 Sep 1999 13:44:57 +0300
MIME-Version: 1.0
Subject: Re: Trouble with templates and gcc-2.95
References: <Pine DOT A41 DOT 4 DOT 05 DOT 9909210954060 DOT 53478-100000 AT ieva01 DOT lanet DOT lv>
In-reply-to: <Pine.SGI.3.95.990921105956.6539B-100000@paju.oulu.fi>
X-mailer: Pegasus Mail for Win32 (v3.12a)
Reply-To: djgpp AT delorie DOT com

On 21 Sep 99, at 11:07, Jari Karppinen wrote:

> 
> > I suggest making smaller test example (to be more sure somebody will take
> > a look at it) and to ask a question in gcc mailing list (gcc AT gcc DOT gnu DOT org).
> 
> Ok, I will do that. 
> 
> By the way, it seems that the problem is related to these 
> declarations in the class body:
> 
> friend Vector<T> operator + <> (const Vector<T>&, const Vector<T>&);
> friend Vector<T> operator - <> (const Vector<T>&, const Vector<T>&);
> friend Vector<T> operator * <> (const Vector<T>&, const T&);
> friend Vector<T> operator * <> (const T&, const Vector<T>&);
> friend Vector<T> operator / <> (const Vector<T>&, const T&);
> 
> If I remove them, everything goes all right. No errors occur while
> compiling and the code seems to work like it should.

Yes I know this. I looked at http://www.icce.rug.nl/docs/cpp.shtml. 
There were something but it didn't help. 

> Am I possibly doing something completely wrong here? How should this kind
> of code be written in the first place (according to the standard, that
> is)?
> 

So perhaps it would be best to ask gcc mailing list (or some other C++ 
related newsgroup)

Andris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019