diff src/ops.h @ 9588:319e2ab9b8ae

warn about the complex comparison ops
author Jaroslav Hajek <highegg@gmail.com>
date Sun, 30 Aug 2009 21:48:19 +0200
parents 5ab448e3febe
children a9b37bae1802
line wrap: on
line diff
--- a/src/ops.h	Sun Aug 30 10:32:10 2009 +0200
+++ b/src/ops.h	Sun Aug 30 21:48:19 2009 +0200
@@ -287,6 +287,15 @@
       (v1.CONCAT2(t1, _value) () op v2.CONCAT2(t2, _value) ()); \
   }
 
+#define DEFCMPLXCMPOP_OP(name, t1, t2, op) \
+  BINOPDECL (name, a1, a2) \
+  { \
+    CAST_BINOP_ARGS (const CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \
+    gripe_warn_complex_cmp (); \
+    return octave_value \
+      (v1.CONCAT2(t1, _value) () op v2.CONCAT2(t2, _value) ()); \
+  }
+
 #define DEFSCALARBOOLOP_OP(name, t1, t2, op) \
   BINOPDECL (name, a1, a2) \
   { \
@@ -325,6 +334,13 @@
     return octave_value (f (v1.CONCAT2(e1, _value) (), v2.CONCAT2(e2, _value) ())); \
   }
 
+#define DEFNDCMPLXCMPOP_FN(name, t1, t2, e1, e2, f) \
+  BINOPDECL (name, a1, a2) \
+  { \
+    CAST_BINOP_ARGS (const CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \
+    return octave_value (f (v1.CONCAT2(e1, _value) (), v2.CONCAT2(e2, _value) ())); \
+  }
+
 #define BINOP_NONCONFORMANT(msg) \
   gripe_nonconformant (msg, \
 		       a1.rows (), a1.columns (), \