compile problem: 'missing typename'

Gunter Winkler <[email protected]> Mon, 26 Feb 2007 16:29:03 +0100
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
--Boundary-00=_Azv4FewRdOM2M76
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello,

here is a list (patch file) of all typenames I had to insert in order to 
compile mtl with gcc 4.1

mfg
Gunter

--Boundary-00=_Azv4FewRdOM2M76
Content-Type: text/x-diff;
  charset="us-ascii";
  name="mtl.typenames.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="mtl.typenames.diff"

--- mtl.h	2005-06-27 10:46:03.000000000 +0200
+++ /home/a11aguwi/mtl.h	2007-02-26 16:18:44.000000000 +0100
@@ -114,7 +102,7 @@ template <class Vector> inline
 typename linalg_traits<Vector>::value_type
 sum(const Vector& x)
 {
-  return sum__(x, dim_n<Vector>::RET());
+  return sum__(x, typename dim_n<Vector>::RET());
 }
 
 #include "mtl/mtl_set.h"
@@ -151,7 +139,7 @@ template <class Vector, class T> inline
 void
 scale_dim(Vector& x, const T& alpha, oned_tag)
 {
-  oned_scale(x, alpha, dim_n<Vector>::RET());
+  oned_scale(x, alpha, typename dim_n<Vector>::RET());
 }
 
 template <class Matrix, class T>
@@ -245,7 +233,7 @@ template <class Vector>
 inline typename linalg_traits<Vector>::magnitude_type
 one_norm(const Vector& x, oned_tag)
 {
-  return oned_one_norm(x, dim_n<Vector>::RET());
+  return oned_one_norm(x, typename dim_n<Vector>::RET());
 }
 
 
@@ -297,7 +285,7 @@ template <class Vector>
 inline typename linalg_traits<Vector>::magnitude_type
 two_norm(const Vector& x)
 {
-  return oned_two_norm(x, dim_n<Vector>::RET());
+  return oned_two_norm(x, typename dim_n<Vector>::RET());
 }
 
 //: add square
@@ -2445,7 +2433,8 @@ inline void
 oned_copy(const VecX& x, VecY& y, dense_tag, dense_tag) MTL_THROW_ASSERTION
 {
   MTL_ASSERT(x.size() <= y.size(), "mtl::copy()");
-  copy__(x, y, dim_n<VecX>::RET());
+  // copy__(x, y, dim_n<VecX>::RET()); gcc4
+  copy__(x, y, typename dim_n<VecX>::RET());
 }  
 
 #if 0
@@ -2713,7 +2702,7 @@ add__(const VecX& x, VecY& y, oned_tag) 
 {
   MTL_ASSERT(x.size() <= y.size(), "mtl::add()");
 
-  add__(x, y, dim_n<VecX>::RET());
+  add__(x, y, typename dim_n<VecX>::RET());
 }
 
 
@@ -2777,7 +2766,8 @@ template <class VecX, class VecY, class 
 inline void
 oned_add(const VecX& x, const VecY& y, VecZ& z, dense_tag) MTL_THROW_ASSERTION
 {
-  oned_add(x, y, z, dim_n<VecX>::RET());
+  // oned_add(x, y, z, dim_n<VecX>::RET()); gcc4
+  oned_add(x, y, z, typename dim_n<VecX>::RET());
 }
 
 
@@ -3003,7 +2993,7 @@ ele_mult(const VecX& x, const VecY& y, M
   MTL_ASSERT(x.size() <= y.size(), "mtl::ele_mult()");
   MTL_ASSERT(x.size() <= z.size(), "mtl::ele_mult()");
 
-  ele_mult(x, y, z, dim_n<VecX>::RET());
+  ele_mult(x, y, z, typename dim_n<VecX>::RET());
 }
 
 
@@ -3080,7 +3070,7 @@ inline void
 swap(VecX& x, VecY& y, oned_tag) MTL_THROW_ASSERTION
 {
   MTL_ASSERT(x.size() <= y.size(), "mtl::swap()");
-  swap(x, y, dim_n<VecX>::RET());
+  swap(x, y, typename dim_n<VecX>::RET());
 }  
 
 
@@ -3153,7 +3143,7 @@ template <class VecX, class VecY, class 
 inline T
 dot(const VecX& x, const VecY& y, T s, dense_tag, dense_tag)
 {
-  return dot(x, y, s, dim_n<VecX>::RET());
+  return dot(x, y, s, typename dim_n<VecX>::RET());
 }
 
 template <class InputIterator1, class InputIterator2, class T>
@@ -3305,7 +3295,7 @@ inline T
 dot_conj(const VecX& x, const VecY& y, T s) MTL_THROW_ASSERTION
 {
   MTL_ASSERT(x.size() <= y.size(), "mtl::dot_conj()");
-  return dot_conj(x, y, s, dim_n<VecX>::RET());
+  return dot_conj(x, y, s, typename dim_n<VecX>::RET());
 }
 
 //: Dot Conjugate:   <tt>s <- x . conj(y)</tt>

--Boundary-00=_Azv4FewRdOM2M76
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
--Boundary-00=_Azv4FewRdOM2M76--