summaryrefslogtreecommitdiff
path: root/math/octave/patches/patch-liboctave_mx-inlines.cc
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2014-06-05 18:33:07 +0000
committerjoerg <joerg@pkgsrc.org>2014-06-05 18:33:07 +0000
commitbefbd41537442baac07ef9e28c6c31964e21bb7c (patch)
tree20f873d925aed678f118264bf2860c1540fc05a4 /math/octave/patches/patch-liboctave_mx-inlines.cc
parent12cc5963d870a9b013ac7b112818b5942d6b6405 (diff)
downloadpkgsrc-befbd41537442baac07ef9e28c6c31964e21bb7c.tar.gz
Don't force std::pow into the global namespace. See comment for further
details.
Diffstat (limited to 'math/octave/patches/patch-liboctave_mx-inlines.cc')
-rw-r--r--math/octave/patches/patch-liboctave_mx-inlines.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/math/octave/patches/patch-liboctave_mx-inlines.cc b/math/octave/patches/patch-liboctave_mx-inlines.cc
new file mode 100644
index 00000000000..50fa87f9240
--- /dev/null
+++ b/math/octave/patches/patch-liboctave_mx-inlines.cc
@@ -0,0 +1,17 @@
+$NetBSD: patch-liboctave_mx-inlines.cc,v 1.1 2014/06/05 18:33:07 joerg Exp $
+
+std::pow is required to promote numeric arguments to the smallest
+common float type. octave_int<> provides another test of template
+specialisations for pow() as well as explicit cast operators.
+The combination of both leads to ambiguous resolutions.
+
+--- liboctave/mx-inlines.cc.orig 2014-06-04 22:00:01.000000000 +0000
++++ liboctave/mx-inlines.cc
+@@ -306,7 +306,6 @@ inline void F (size_t n, R *r, X x, cons
+
+ // Let the compiler decide which pow to use, whichever best matches the
+ // arguments provided.
+-using std::pow;
+ DEFMXMAPPER2X (mx_inline_pow, pow)
+
+ // Arbitrary function appliers. The function is a template parameter to enable