aboutsummaryrefslogtreecommitdiff
path: root/libstdc++/std/dcomplex.h
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-10-10 06:56:56 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-10-10 02:56:56 -0400
commitda8c445d07f00dc4f10f25d1cc891d4f3ff1523f (patch)
tree47392e51a8359ac6c8decb14f03764f851f5a4aa /libstdc++/std/dcomplex.h
parent5b76d03baac8a93708b2c8cb4ca30ea095fd8be0 (diff)
downloadgcc-da8c445d07f00dc4f10f25d1cc891d4f3ff1523f.zip
gcc-da8c445d07f00dc4f10f25d1cc891d4f3ff1523f.tar.gz
gcc-da8c445d07f00dc4f10f25d1cc891d4f3ff1523f.tar.bz2
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
Diffstat (limited to 'libstdc++/std/dcomplex.h')
-rw-r--r--libstdc++/std/dcomplex.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libstdc++/std/dcomplex.h b/libstdc++/std/dcomplex.h
index 5bc329c..5812d9f 100644
--- a/libstdc++/std/dcomplex.h
+++ b/libstdc++/std/dcomplex.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, double y)
+ { return operator+<> (x, y); }
+ friend inline complex operator + (double x, const complex& y)
+ { return operator+<> (x, y); }
+ friend inline complex operator - (const complex& x, double y)
+ { return operator-<> (x, y); }
+ friend inline complex operator - (double x, const complex& y)
+ { return operator-<> (x, y); }
+ friend inline complex operator * (const complex& x, double y)
+ { return operator*<> (x, y); }
+ friend inline complex operator * (double x, const complex& y)
+ { return operator*<> (x, y); }
+ friend inline complex operator / (const complex& x, double y)
+ { return operator/<> (x, y); }
+ friend inline complex operator / (double x, const complex& y)
+ { return operator/<> (x, y); }
+ friend inline bool operator == (const complex& x, double y)
+ { return operator==<> (x, y); }
+ friend inline bool operator == (double x, const complex& y)
+ { return operator==<> (x, y); }
+ friend inline bool operator != (const complex& x, double y)
+ { return operator!=<> (x, y); }
+ friend inline bool operator != (double x, const complex& y)
+ { return operator!=<> (x, y); }
+#endif /* __STRICT_ANSI__ */
};
inline complex<float>::complex (const complex<double>& r)