From da8c445d07f00dc4f10f25d1cc891d4f3ff1523f Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 10 Oct 1997 06:56:56 +0000 Subject: stdexcepti.cc (__out_of_range): New fn. * stdexcepti.cc (__out_of_range): New fn. (__length_error): New fn. * std/bastring.h (OUTOFRANGE): Fix logic. Use throwing functions. (LENGTHERROR): Likewise. Revert Oct 2 changes. * string: Revert Oct 2 changes. * std/{f,d,ld}complex.h: Replace guiding fns if not -ansi. From-SVN: r15885 --- libstdc++/std/fcomplex.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'libstdc++/std/fcomplex.h') diff --git a/libstdc++/std/fcomplex.h b/libstdc++/std/fcomplex.h index 476c4b6..cd9af1a 100644 --- a/libstdc++/std/fcomplex.h +++ b/libstdc++/std/fcomplex.h @@ -54,6 +54,33 @@ private: friend complex& __doami<> (complex *, const complex&); friend complex& __doaml<> (complex *, const complex&); friend complex& __doadv<> (complex *, const complex&); + +#ifndef __STRICT_ANSI__ + friend inline complex operator + (const complex& x, float y) + { return operator+<> (x, y); } + friend inline complex operator + (float x, const complex& y) + { return operator+<> (x, y); } + friend inline complex operator - (const complex& x, float y) + { return operator-<> (x, y); } + friend inline complex operator - (float x, const complex& y) + { return operator-<> (x, y); } + friend inline complex operator * (const complex& x, float y) + { return operator*<> (x, y); } + friend inline complex operator * (float x, const complex& y) + { return operator*<> (x, y); } + friend inline complex operator / (const complex& x, float y) + { return operator/<> (x, y); } + friend inline complex operator / (float x, const complex& y) + { return operator/<> (x, y); } + friend inline bool operator == (const complex& x, float y) + { return operator==<> (x, y); } + friend inline bool operator == (float x, const complex& y) + { return operator==<> (x, y); } + friend inline bool operator != (const complex& x, float y) + { return operator!=<> (x, y); } + friend inline bool operator != (float x, const complex& y) + { return operator!=<> (x, y); } +#endif /* __STRICT_ANSI__ */ }; } // extern "C++" -- cgit v1.1