From 905a881f36b6aea9113a3b369e36e85033bbea84 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 28 Sep 1997 15:21:52 -0400 Subject: [multiple changes] Sat Sep 27 16:48:00 1997 Jason Merrill * std/complext.h: Lose injection decls. * std/fcomplex.h: Likewise. * std/dcomplex.h: Likewise. * std/ldcomplex.h: Likewise. Sat Sep 27 16:47:35 1997 Mark Mitchell * std/complext.h: Declare templates before making them friends. Use new friend <> syntax. * std/complext.cc: Don't rely on guiding declarations. * std/fcomplex.h: Use new friend <> syntax. * std/dcomplex.h: Likewise. * std/ldcomplex.h: Likewise. From-SVN: r15776 --- libstdc++/std/dcomplex.h | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'libstdc++/std/dcomplex.h') diff --git a/libstdc++/std/dcomplex.h b/libstdc++/std/dcomplex.h index fde3f09..5bc329c 100644 --- a/libstdc++/std/dcomplex.h +++ b/libstdc++/std/dcomplex.h @@ -50,40 +50,10 @@ public: private: double re, im; - friend complex& __doapl (complex *, const complex&); - friend complex& __doami (complex *, const complex&); - friend complex& __doaml (complex *, const complex&); - friend complex& __doadv (complex *, const complex&); - - // These functions are specified as friends for purposes of name injection; - // they do not actually reference private members. - friend double real (const complex& x) { return x.real (); } - friend double imag (const complex& x) { return x.imag (); } - friend complex operator + (const complex&, const complex&) __attribute__ ((const)); - friend complex operator + (const complex&, double) __attribute__ ((const)); - friend complex operator + (double, const complex&) __attribute__ ((const)); - friend complex operator - (const complex&, const complex&) __attribute__ ((const)); - friend complex operator - (const complex&, double) __attribute__ ((const)); - friend complex operator - (double, const complex&) __attribute__ ((const)); - friend complex operator * (const complex&, const complex&) __attribute__ ((const)); - friend complex operator * (const complex&, double) __attribute__ ((const)); - friend complex operator * (double, const complex&) __attribute__ ((const)); - friend complex operator / (const complex&, const complex&) __attribute__ ((const)); - friend complex operator / (const complex&, double) __attribute__ ((const)); - friend complex operator / (double, const complex&) __attribute__ ((const)); - friend bool operator == (const complex&, const complex&) __attribute__ ((const)); - friend bool operator == (const complex&, double) __attribute__ ((const)); - friend bool operator == (double, const complex&) __attribute__ ((const)); - friend bool operator != (const complex&, const complex&) __attribute__ ((const)); - friend bool operator != (const complex&, double) __attribute__ ((const)); - friend bool operator != (double, const complex&) __attribute__ ((const)); - friend complex polar (double, double) __attribute__ ((const)); - friend complex pow (const complex&, const complex&) __attribute__ ((const)); - friend complex pow (const complex&, double) __attribute__ ((const)); - friend complex pow (const complex&, int) __attribute__ ((const)); - friend complex pow (double, const complex&) __attribute__ ((const)); - friend istream& operator>> (istream&, complex&); - friend ostream& operator<< (ostream&, const complex&); + friend complex& __doapl<> (complex *, const complex&); + friend complex& __doami<> (complex *, const complex&); + friend complex& __doaml<> (complex *, const complex&); + friend complex& __doadv<> (complex *, const complex&); }; inline complex::complex (const complex& r) -- cgit v1.1