# HG changeset patch # User John W. Eaton # Date 1242070495 14400 # Node ID c229bfb14d8d55a277b5a397b405617973145cfa # Parent d18be838d5c431133d7ff3a42c84e7355be72677 avoid apparent MSVC bug with typedef diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2009-05-11 John W. Eaton + * sparse-xdiv.cc (do_rightdiv_sm_dm, do_leftdiv_dm_sm): + Avoid apparent MSVC bug with typedef. + * Makefile.in (install-lib): Remove $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB_VER), not $(DESTDIR)$(octlibdir)/$(SHLPRE)octinterp.$(SHLEXT_VER). diff --git a/src/sparse-xdiv.cc b/src/sparse-xdiv.cc --- a/src/sparse-xdiv.cc +++ b/src/sparse-xdiv.cc @@ -307,13 +307,14 @@ const octave_idx_type nz = a.nnz (); RT r (a_nr, nc, nz); - const typename DM::element_type zero = typename DM::element_type (); + typedef typename DM::element_type DM_elt_type; + const DM_elt_type zero = DM_elt_type (); octave_idx_type k_result = 0; for (octave_idx_type j = 0; j < nc; ++j) { OCTAVE_QUIT; - const typename DM::element_type s = d.dgelem (j); + const DM_elt_type s = d.dgelem (j); const octave_idx_type colend = a.cidx (j+1); r.xcidx (j) = k_result; if (s != zero) @@ -573,7 +574,8 @@ const octave_idx_type nz = a.nnz (); RT r (nr, a_nc, nz); - const typename DM::element_type zero = typename DM::element_type (); + typedef typename DM::element_type DM_elt_type; + const DM_elt_type zero = DM_elt_type (); octave_idx_type k_result = 0; for (octave_idx_type j = 0; j < a_nc; ++j) @@ -586,7 +588,7 @@ const octave_idx_type i = a.ridx (k); if (i < nr) { - const typename DM::element_type s = d.dgelem (i); + const DM_elt_type s = d.dgelem (i); if (s != zero) { r.xdata (k_result) = a.data (k) / s;