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/fcomplex.h | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'libstdc++/std/fcomplex.h') diff --git a/libstdc++/std/fcomplex.h b/libstdc++/std/fcomplex.h index 3a389e0..476c4b6 100644 --- a/libstdc++/std/fcomplex.h +++ b/libstdc++/std/fcomplex.h @@ -50,40 +50,10 @@ public: private: float 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 float real (const complex& x) { return x.real (); } - friend float imag (const complex& x) { return x.imag (); } - friend complex operator + (const complex&, const complex&) __attribute__ ((const)); - friend complex operator + (const complex&, float) __attribute__ ((const)); - friend complex operator + (float, const complex&) __attribute__ ((const)); - friend complex operator - (const complex&, const complex&) __attribute__ ((const)); - friend complex operator - (const complex&, float) __attribute__ ((const)); - friend complex operator - (float, const complex&) __attribute__ ((const)); - friend complex operator * (const complex&, const complex&) __attribute__ ((const)); - friend complex operator * (const complex&, float) __attribute__ ((const)); - friend complex operator * (float, const complex&) __attribute__ ((const)); - friend complex operator / (const complex&, const complex&) __attribute__ ((const)); - friend complex operator / (const complex&, float) __attribute__ ((const)); - friend complex operator / (float, const complex&) __attribute__ ((const)); - friend bool operator == (const complex&, const complex&) __attribute__ ((const)); - friend bool operator == (const complex&, float) __attribute__ ((const)); - friend bool operator == (float, const complex&) __attribute__ ((const)); - friend bool operator != (const complex&, const complex&) __attribute__ ((const)); - friend bool operator != (const complex&, float) __attribute__ ((const)); - friend bool operator != (float, const complex&) __attribute__ ((const)); - friend complex polar (float, float) __attribute__ ((const)); - friend complex pow (const complex&, const complex&) __attribute__ ((const)); - friend complex pow (const complex&, float) __attribute__ ((const)); - friend complex pow (const complex&, int) __attribute__ ((const)); - friend complex pow (float, 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&); }; } // extern "C++" -- cgit v1.1