Re: [eigen] abs/maxCoeff/sum is not a member of EigenCwiseBinaryOp

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


While testing on linux, I run into a trivial problem (unrelated to the MSVC 2010 problems), whose fix is below:

eigen-3.3/ > gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

eigen-3.3/ > hg diff
diff -r 334b1d428283 Eigen/src/SparseCore/SparseProduct.h
--- a/Eigen/src/SparseCore/SparseProduct.h      Sat Jun 25 10:12:06 2016 +0200
+++ b/Eigen/src/SparseCore/SparseProduct.h      Mon Jun 27 17:38:15 2016 +0200
@@ -45,7 +45,7 @@

   // dense += sparse * sparse
   template<typename Dest,typename ActualLhs>
-  static void addTo(Dest& dst, const ActualLhs& lhs, const Rhs& rhs, int* = typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type(0) )
+  static void addTo(Dest& dst, const ActualLhs& lhs, const Rhs& rhs, typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type* = 0)
   {
     typedef typename nested_eval<ActualLhs,Dynamic>::type LhsNested;
     typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
@@ -57,7 +57,7 @@

   // dense -= sparse * sparse
   template<typename Dest>
-  static void subTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, int* = typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type(0) )
+  static void subTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type* = 0)
   {
     addTo(dst, -lhs, rhs);
   }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/