aboutsummaryrefslogtreecommitdiff
path: root/libstdc++/std/dcomplex.h
diff options
context:
space:
mode:
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)