Mail Archives: djgpp/1994/01/31/14:32:55
Well, it seems from the asm output, the C++ is happy to provide
a compilation for the ostream operator friend function of a
template class, but AS is not so amiable :-)
Now, rather than a DJGPP-problem, I think I have a generic C++
problem. I have a template class of Coordinate<T> and I want to
define
friend ostream& operator<<(ostream&s, Coordinate<T>&c)
for various values of T (int, float, double &c).
Outside the class declaration, if I don't use the <type> tag on the
class name, I get a syntax error (parse error before &) and if I do,
the compiler is happy, but not the assembler. Inside the class, I can
declare this function as a friend with a second parameter of just
"Coordinate&", but how do I define this outside the class? (ie. where
I define the function body)
Gary Lawrence Murphy ----------------- garym AT virtual DOT rose DOT utoronto DOT ca
University of Toronto ---------- 4 Taddle Creek, Toronto, Ont M5S 1A4
Human Factors, Ind Engineering ------------ fax/voice: (416) 978-3776
----------------------- The true destination is always just here, now
- Raw text -