delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/21/08:52:54

Newsgroups: comp.os.msdos.djgpp
Date: Tue, 21 Sep 1999 11:07:16 +0300 (EDT)
From: Jari Karppinen <jakarppi AT mail DOT student DOT oulu DOT fi>
X-Sender: jakarppi AT paju DOT oulu DOT fi
To: Andris Pavenis <pavenis AT lanet DOT lv>
cc: djgpp AT delorie DOT com
Subject: Re: Trouble with templates and gcc-2.95
In-Reply-To: <Pine.A41.4.05.9909210954060.53478-100000@ieva01.lanet.lv>
Message-ID: <Pine.SGI.3.95.990921105956.6539B-100000@paju.oulu.fi>
References: <Pine DOT A41 DOT 4 DOT 05 DOT 9909210954060 DOT 53478-100000 AT ieva01 DOT lanet DOT lv>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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

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

- Raw text -


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