changeset 21139:538b57866b90

consistently use "typename" intead of "class" in template declarations * Object.h, QtHandlesUtils.cc, QtHandlesUtils.h, ToolBarButton.cc, ToolBarButton.h, Cell.h, __lin_interpn__.cc, bitfcns.cc, bsxfun.cc, cellfun.cc, data.cc, filter.cc, gcd.cc, graphics.cc, help.cc, kron.cc, lookup.cc, ls-mat5.cc, ls-oct-text.h, lu.cc, max.cc, mgorth.cc, oct-map.cc, oct-map.h, oct-stream.cc, oct-stream.h, octave-link.h, pr-output.cc, profiler.h, schur.cc, sparse-xdiv.cc, sparse-xpow.cc, sqrtm.cc, symtab.h, tril.cc, typecast.cc, variables.cc, xdiv.cc, zfstream.h, __init_fltk__.cc, __magick_read__.cc, chol.cc, qr.cc, ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc, ov-base-int.h, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc, ov-base-scalar.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.h, ov-classdef.cc, ov-int-traits.h, ov-java.h, ov-usr-fcn.h, ov.cc, ov.h, op-dms-template.cc, oct-parse.in.yy, parse.h, pt-mat.cc, Array-b.cc, Array.cc, Array.h, CDiagMatrix.h, CMatrix.h, CNDArray.h, DiagArray2.cc, DiagArray2.h, MArray.cc, MArray.h, MDiagArray2.cc, MDiagArray2.h, MSparse.cc, MSparse.h, MatrixType.cc, Sparse.cc, Sparse.h, dDiagMatrix.h, dMatrix.h, dNDArray.h, fCDiagMatrix.h, fCMatrix.h, fCNDArray.h, fDiagMatrix.h, fMatrix.h, fNDArray.h, idx-vector.cc, idx-vector.h, intNDArray.cc, intNDArray.h, DET.h, base-aepbal.h, base-lu.cc, base-lu.h, base-qr.cc, base-qr.h, bsxfun-defs.cc, eigs-base.cc, lo-mappers.h, lo-specfun.cc, lo-specfun.h, oct-convn.cc, oct-fftw.cc, oct-norm.cc, sparse-base-chol.cc, sparse-base-chol.h, sparse-base-lu.cc, sparse-base-lu.h, sparse-dmsolve.cc, mx-inlines.cc, action-container.h, base-list.h, lo-traits.h, lo-utils.h, oct-base64.h, oct-binmap.h, oct-cmplx.h, oct-inttypes.cc, oct-inttypes.h, oct-locbuf.h, oct-refcount.h, oct-sort.cc, oct-sort.h: Use "typename" instead of "class" in template declarations.
author John W. Eaton <jwe@octave.org>
date Sun, 24 Jan 2016 13:50:04 -0500
parents e2fca7d79169
children e06e600f396a
files libgui/graphics/Object.h libgui/graphics/QtHandlesUtils.cc libgui/graphics/QtHandlesUtils.h libgui/graphics/ToolBarButton.cc libgui/graphics/ToolBarButton.h libinterp/corefcn/Cell.h libinterp/corefcn/__lin_interpn__.cc libinterp/corefcn/bitfcns.cc libinterp/corefcn/bsxfun.cc libinterp/corefcn/cellfun.cc libinterp/corefcn/data.cc libinterp/corefcn/filter.cc libinterp/corefcn/gcd.cc libinterp/corefcn/graphics.cc libinterp/corefcn/help.cc libinterp/corefcn/kron.cc libinterp/corefcn/lookup.cc libinterp/corefcn/ls-mat5.cc libinterp/corefcn/ls-oct-text.h libinterp/corefcn/lu.cc libinterp/corefcn/max.cc libinterp/corefcn/mgorth.cc libinterp/corefcn/oct-map.cc libinterp/corefcn/oct-map.h libinterp/corefcn/oct-stream.cc libinterp/corefcn/oct-stream.h libinterp/corefcn/octave-link.h libinterp/corefcn/pr-output.cc libinterp/corefcn/profiler.h libinterp/corefcn/schur.cc libinterp/corefcn/sparse-xdiv.cc libinterp/corefcn/sparse-xpow.cc libinterp/corefcn/sqrtm.cc libinterp/corefcn/symtab.h libinterp/corefcn/tril.cc libinterp/corefcn/typecast.cc libinterp/corefcn/variables.cc libinterp/corefcn/xdiv.cc libinterp/corefcn/zfstream.h libinterp/dldfcn/__init_fltk__.cc libinterp/dldfcn/__magick_read__.cc libinterp/dldfcn/chol.cc libinterp/dldfcn/qr.cc libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-diag.h libinterp/octave-value/ov-base-int.cc libinterp/octave-value/ov-base-int.h libinterp/octave-value/ov-base-mat.cc libinterp/octave-value/ov-base-mat.h libinterp/octave-value/ov-base-scalar.cc libinterp/octave-value/ov-base-scalar.h libinterp/octave-value/ov-base-sparse.cc libinterp/octave-value/ov-base-sparse.h libinterp/octave-value/ov-base.h libinterp/octave-value/ov-classdef.cc libinterp/octave-value/ov-int-traits.h libinterp/octave-value/ov-java.h libinterp/octave-value/ov-usr-fcn.h libinterp/octave-value/ov.cc libinterp/octave-value/ov.h libinterp/operators/op-dms-template.cc libinterp/parse-tree/oct-parse.in.yy libinterp/parse-tree/parse.h libinterp/parse-tree/pt-mat.cc liboctave/array/Array-b.cc liboctave/array/Array.cc liboctave/array/Array.h liboctave/array/CDiagMatrix.h liboctave/array/CMatrix.h liboctave/array/CNDArray.h liboctave/array/DiagArray2.cc liboctave/array/DiagArray2.h liboctave/array/MArray.cc liboctave/array/MArray.h liboctave/array/MDiagArray2.cc liboctave/array/MDiagArray2.h liboctave/array/MSparse.cc liboctave/array/MSparse.h liboctave/array/MatrixType.cc liboctave/array/Sparse.cc liboctave/array/Sparse.h liboctave/array/dDiagMatrix.h liboctave/array/dMatrix.h liboctave/array/dNDArray.h liboctave/array/fCDiagMatrix.h liboctave/array/fCMatrix.h liboctave/array/fCNDArray.h liboctave/array/fDiagMatrix.h liboctave/array/fMatrix.h liboctave/array/fNDArray.h liboctave/array/idx-vector.cc liboctave/array/idx-vector.h liboctave/array/intNDArray.cc liboctave/array/intNDArray.h liboctave/numeric/DET.h liboctave/numeric/base-aepbal.h liboctave/numeric/base-lu.cc liboctave/numeric/base-lu.h liboctave/numeric/base-qr.cc liboctave/numeric/base-qr.h liboctave/numeric/bsxfun-defs.cc liboctave/numeric/eigs-base.cc liboctave/numeric/lo-mappers.h liboctave/numeric/lo-specfun.cc liboctave/numeric/lo-specfun.h liboctave/numeric/oct-convn.cc liboctave/numeric/oct-fftw.cc liboctave/numeric/oct-norm.cc liboctave/numeric/sparse-base-chol.cc liboctave/numeric/sparse-base-chol.h liboctave/numeric/sparse-base-lu.cc liboctave/numeric/sparse-base-lu.h liboctave/numeric/sparse-dmsolve.cc liboctave/operators/mx-inlines.cc liboctave/util/action-container.h liboctave/util/base-list.h liboctave/util/lo-traits.h liboctave/util/lo-utils.h liboctave/util/oct-base64.h liboctave/util/oct-binmap.h liboctave/util/oct-cmplx.h liboctave/util/oct-inttypes.cc liboctave/util/oct-inttypes.h liboctave/util/oct-locbuf.h liboctave/util/oct-refcount.h liboctave/util/oct-sort.cc liboctave/util/oct-sort.h
diffstat 127 files changed, 964 insertions(+), 960 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Object.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libgui/graphics/Object.h	Sun Jan 24 13:50:04 2016 -0500
@@ -52,14 +52,14 @@
   const base_properties& properties (void) const
     { return object ().get_properties (); }
 
-  template <class T>
+  template <typename T>
   typename T::properties& properties (void)
     {
       return dynamic_cast<typename T::properties&>
         (object ().get_properties ());
     }
 
-  template <class T>
+  template <typename T>
   const typename T::properties& properties (void) const
     {
       return dynamic_cast<const typename T::properties&>
@@ -70,7 +70,7 @@
 
   virtual QObject* qObject (void) { return m_qobject; }
 
-  template <class T>
+  template <typename T>
   T* qWidget (void) { return qobject_cast<T*>(qObject ()); }
 
   virtual Container* innerContainer (void) = 0;
--- a/libgui/graphics/QtHandlesUtils.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libgui/graphics/QtHandlesUtils.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -98,7 +98,7 @@
   return v;
 }
 
-template <class T>
+template <typename T>
 QFont
 computeFont (const typename T::properties& props, int height)
 {
--- a/libgui/graphics/QtHandlesUtils.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libgui/graphics/QtHandlesUtils.h	Sun Jan 24 13:50:04 2016 -0500
@@ -49,7 +49,7 @@
 
   Cell toCellString (const QStringList& l);
 
-  template <class T>
+  template <typename T>
   QFont computeFont (const typename T::properties& props, int height = -1);
 
   QColor fromRgb (const Matrix& rgb);
@@ -64,12 +64,12 @@
   Matrix figureCurrentPoint (const graphics_object& fig, QMouseEvent* event);
   Matrix figureCurrentPoint (const graphics_object& fig);
 
-  template <class T>
+  template <typename T>
   inline typename T::properties&
   properties (graphics_object obj)
     { return dynamic_cast<typename T::properties&> (obj.get_properties ()); }
 
-  template <class T>
+  template <typename T>
   inline typename T::properties&
   properties (const graphics_handle& h)
     { return Utils::properties<T> (gh_manager::get_object (h)); }
--- a/libgui/graphics/ToolBarButton.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libgui/graphics/ToolBarButton.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -33,7 +33,7 @@
 namespace QtHandles
 {
 
-template <class T>
+template <typename T>
 ToolBarButton<T>::ToolBarButton (const graphics_object& go, QAction* action)
   : Object (go, action), m_separator (0)
 {
@@ -58,12 +58,12 @@
     w->insertAction (action, m_separator);
 }
 
-template <class T>
+template <typename T>
 ToolBarButton<T>::~ToolBarButton (void)
 {
 }
 
-template <class T>
+template <typename T>
 void
 ToolBarButton<T>::update (int pId)
 {
--- a/libgui/graphics/ToolBarButton.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libgui/graphics/ToolBarButton.h	Sun Jan 24 13:50:04 2016 -0500
@@ -32,7 +32,7 @@
 
 class Container;
 
-template <class T>
+template <typename T>
 class ToolBarButton : public Object
 {
 public:
--- a/libinterp/corefcn/Cell.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/Cell.h	Sun Jan 24 13:50:04 2016 -0500
@@ -142,7 +142,7 @@
   Cell map (ctype_mapper) const;
 };
 
-template<>
+template <>
 inline Cell octave_value_extract<Cell> (const octave_value& v)
 { return v.cell_value (); }
 
--- a/libinterp/corefcn/__lin_interpn__.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/__lin_interpn__.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -34,7 +34,7 @@
 
 // equivalent to isvector.m
 
-template <class T>
+template <typename T>
 bool
 isvector (const T& array)
 {
@@ -43,7 +43,7 @@
 }
 
 // lookup a value in a sorted table (lookup.m)
-template <class T>
+template <typename T>
 octave_idx_type
 lookup (const T *x, octave_idx_type n, T y)
 {
@@ -122,7 +122,7 @@
 
 // n-dimensional linear interpolation
 
-template <class T>
+template <typename T>
 void
 lin_interpn (int n, const octave_idx_type *size, const octave_idx_type *scale,
              octave_idx_type Ni, T extrapval, const T **x,
@@ -181,7 +181,7 @@
     }
 }
 
-template <class T, class M>
+template <typename T, typename M>
 octave_value
 lin_interpn (int n, M *X, const M V, M *Y)
 {
--- a/libinterp/corefcn/bitfcns.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/bitfcns.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -113,7 +113,7 @@
 // reflective information hardwired. We can't hardwire this information
 // in Fbitxxx DEFUNs below, because at that moment, we still don't have
 // information about which integer types we need to instantiate.
-template<typename T>
+template <typename T>
 octave_value
 bitopx (const std::string& fname, const Array<T>& x, const Array<T>& y)
 {
--- a/libinterp/corefcn/bsxfun.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/bsxfun.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -95,7 +95,7 @@
 // Static table of handlers.
 bsxfun_handler bsxfun_handler_table[bsxfun_num_builtin_ops][btyp_num_types];
 
-template <class NDA, NDA (bsxfun_op) (const NDA&, const NDA&)>
+template <typename NDA, NDA (bsxfun_op) (const NDA&, const NDA&)>
 static octave_value
 bsxfun_forward_op (const octave_value& x, const octave_value& y)
 {
@@ -104,7 +104,7 @@
   return octave_value (bsxfun_op (xa, ya));
 }
 
-template <class NDA, boolNDArray (bsxfun_rel) (const NDA&, const NDA&)>
+template <typename NDA, boolNDArray (bsxfun_rel) (const NDA&, const NDA&)>
 static octave_value
 bsxfun_forward_rel (const octave_value& x, const octave_value& y)
 {
@@ -115,7 +115,7 @@
 
 // pow() needs a special handler for reals
 // because of the potentially complex result.
-template <class NDA, class CNDA>
+template <typename NDA, typename CNDA>
 static octave_value
 do_bsxfun_real_pow (const octave_value& x, const octave_value& y)
 {
--- a/libinterp/corefcn/cellfun.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/cellfun.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -118,7 +118,7 @@
 // Templated function because the user can be stubborn enough to request
 // a cell array as an output even in these cases where the output fits
 // in an ordinary array
-template<typename BNDA, typename NDA>
+template <typename BNDA, typename NDA>
 static octave_value_list
 try_cellfun_internal_ops (const octave_value_list& args, int nargin)
 {
@@ -1639,7 +1639,7 @@
       arraydv(i) = 1;
 }
 
-template<class NDA>
+template <typename NDA>
 static inline typename NDA::element_type
 do_num2cell_elem (const NDA& array, octave_idx_type i)
 { return array(i); }
@@ -1649,7 +1649,7 @@
 { return Cell (array(i)); }
 
 
-template<class NDA>
+template <typename NDA>
 static Cell
 do_num2cell (const NDA& array, const Array<int>& dimv)
 {
@@ -1861,7 +1861,7 @@
   return false;
 }
 
-template<class container>
+template <typename container>
 static void
 prepare_idx (container *idx, int idim, int nd,
              const Array<octave_idx_type>* d)
@@ -1884,7 +1884,7 @@
 // 2D specialization, works for Array, Sparse and octave_map.
 // Uses 1D or 2D indexing.
 
-template <class Array2D>
+template <typename Array2D>
 static Cell
 do_mat2cell_2d (const Array2D& a, const Array<octave_idx_type> *d, int nd)
 {
@@ -1941,7 +1941,7 @@
 // Nd case. Works for Arrays and octave_map.
 // Uses Nd indexing.
 
-template <class ArrayND>
+template <typename ArrayND>
 Cell
 do_mat2cell_nd (const ArrayND& a, const Array<octave_idx_type> *d, int nd)
 {
@@ -1993,7 +1993,7 @@
 }
 
 // Dispatcher.
-template <class ArrayND>
+template <typename ArrayND>
 Cell
 do_mat2cell (const ArrayND& a, const Array<octave_idx_type> *d, int nd)
 {
@@ -2190,7 +2190,7 @@
 */
 
 // FIXME: it would be nice to allow ranges being handled without a conversion.
-template <class NDA>
+template <typename NDA>
 static Cell
 do_cellslices_nda (const NDA& array,
                    const Array<octave_idx_type>& lb,
--- a/libinterp/corefcn/data.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/data.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -461,7 +461,7 @@
 
 */
 
-template<typename T, typename ET>
+template <typename T, typename ET>
 void
 map_2_xlog2 (const Array<T>& x, Array<T>& f, Array<ET>& e)
 {
@@ -1682,7 +1682,7 @@
   return true;
 }
 
-template <class TYPE, class T>
+template <typename TYPE, typename T>
 static void
 single_type_concat (Array<T>& result,
                     const octave_value_list& args,
@@ -1725,7 +1725,7 @@
     }
 }
 
-template <class TYPE, class T>
+template <typename TYPE, typename T>
 static void
 single_type_concat (Sparse<T>& result,
                     const octave_value_list& args,
@@ -1745,7 +1745,7 @@
 }
 
 // Dispatcher.
-template<class TYPE>
+template <typename TYPE>
 static TYPE
 do_single_type_concat (const octave_value_list& args, int dim)
 {
@@ -1756,7 +1756,7 @@
   return result;
 }
 
-template<class MAP>
+template <typename MAP>
 static void
 single_type_concat_map (octave_map& result,
                         const octave_value_list& args,
@@ -4811,7 +4811,7 @@
   return fill_matrix (args, true, "true");
 }
 
-template <class MT>
+template <typename MT>
 octave_value
 identity_matrix (int nr, int nc)
 {
@@ -5025,7 +5025,7 @@
 %!error eye (1, 2, 3)
 */
 
-template <class MT>
+template <typename MT>
 static octave_value
 do_linspace (const octave_value& base, const octave_value& limit,
              octave_idx_type n)
@@ -6929,7 +6929,7 @@
   return retval;
 }
 
-template <class NDT>
+template <typename NDT>
 static NDT
 do_accumarray_sum (const idx_vector& idx, const NDT& vals,
                    octave_idx_type n = -1)
@@ -7014,7 +7014,7 @@
   return retval;
 }
 
-template <class NDT>
+template <typename NDT>
 static NDT
 do_accumarray_minmax (const idx_vector& idx, const NDT& vals,
                       octave_idx_type n, bool ismin,
@@ -7144,7 +7144,7 @@
   return do_accumarray_minmax_fun (args, false);
 }
 
-template <class NDT>
+template <typename NDT>
 static NDT
 do_accumdim_sum (const idx_vector& idx, const NDT& vals,
                  int dim = -1, octave_idx_type n = -1)
@@ -7234,7 +7234,7 @@
   return retval;
 }
 
-template <class NDT>
+template <typename NDT>
 static NDT
 do_merge (const Array<bool>& mask,
           const NDT& tval, const NDT& fval)
@@ -7405,7 +7405,7 @@
 
 #undef MAKE_INT_BRANCH
 
-template <class SparseT>
+template <typename SparseT>
 static SparseT
 do_sparse_diff (const SparseT& array, octave_idx_type order,
                 int dim)
@@ -7606,7 +7606,7 @@
 %!error diff ([1, 2; 3, 4], -1)
 */
 
-template <class T>
+template <typename T>
 static Array<T>
 do_repelems (const Array<T>& src, const Array<octave_idx_type>& rep)
 {
--- a/libinterp/corefcn/filter.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/filter.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -53,7 +53,7 @@
         int dim);
 #endif
 
-template <class T>
+template <typename T>
 MArray<T>
 filter (MArray<T>& b, MArray<T>& a, MArray<T>& x, MArray<T>& si,
         int dim = 0)
@@ -235,7 +235,7 @@
         MArray<FloatComplex>&, int dim);
 #endif
 
-template <class T>
+template <typename T>
 MArray<T>
 filter (MArray<T>& b, MArray<T>& a, MArray<T>& x, int dim = -1)
 {
--- a/libinterp/corefcn/gcd.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/gcd.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -96,7 +96,7 @@
   return aa;
 }
 
-template <class T>
+template <typename T>
 static octave_int<T>
 simple_gcd (const octave_int<T>& a, const octave_int<T>& b)
 {
@@ -196,7 +196,7 @@
   return aa;
 }
 
-template <class T>
+template <typename T>
 static octave_int<T>
 extended_gcd (const octave_int<T>& a, const octave_int<T>& b,
               octave_int<T>& x, octave_int<T>& y)
@@ -229,7 +229,7 @@
   return aa;
 }
 
-template<class NDA>
+template <typename NDA>
 static octave_value
 do_simple_gcd (const octave_value& a, const octave_value& b)
 {
@@ -309,7 +309,7 @@
   return retval;
 }
 
-template<class NDA>
+template <typename NDA>
 static octave_value
 do_extended_gcd (const octave_value& a, const octave_value& b,
                  octave_value& x, octave_value& y)
--- a/libinterp/corefcn/graphics.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/graphics.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -870,7 +870,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 convert_cdata_1 (bool is_scaled, bool is_real, double clim_0, double clim_1,
                  const double *cmapv, const T *cv, octave_idx_type lda,
@@ -966,7 +966,7 @@
   return octave_value (a);
 }
 
-template<class T>
+template <typename T>
 static void
 get_array_limits (const Array<T>& m, double& emin, double& emax,
                   double& eminp, double& emaxp)
--- a/libinterp/corefcn/help.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/help.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -98,7 +98,7 @@
 typedef map_type::value_type pair_type;
 typedef map_type::const_iterator map_iter;
 
-template<typename T, size_t z>
+template <typename T, size_t z>
 size_t
 size (T const (&)[z])
 {
--- a/libinterp/corefcn/kron.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/kron.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -48,7 +48,7 @@
 #include "error.h"
 #include "ovl.h"
 
-template <class R, class T>
+template <typename R, typename T>
 static MArray<T>
 kron (const MArray<R>& a, const MArray<T>& b)
 {
@@ -75,7 +75,7 @@
   return c;
 }
 
-template <class R, class T>
+template <typename R, typename T>
 static MArray<T>
 kron (const MDiagArray2<R>& a, const MArray<T>& b)
 {
@@ -100,7 +100,7 @@
   return c;
 }
 
-template <class T>
+template <typename T>
 static MSparse<T>
 kron (const MSparse<T>& A, const MSparse<T>& B)
 {
@@ -150,7 +150,7 @@
   return PermMatrix (res_perm, true);
 }
 
-template <class MTA, class MTB>
+template <typename MTA, typename MTB>
 octave_value
 do_kron (const octave_value& a, const octave_value& b)
 {
--- a/libinterp/corefcn/lookup.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/lookup.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -83,7 +83,7 @@
 }
 #endif
 
-template <class T>
+template <typename T>
 inline sortmode
 get_sort_mode (const Array<T>& array,
                typename octave_sort<T>::compare_fcn_type desc_comp
@@ -106,7 +106,7 @@
                                 y.TYPE ## _array_value (), \
                                 left_inf, right_inf, \
                                 match_idx, match_bool);
-template <class ArrayT>
+template <typename ArrayT>
 static octave_value
 do_numeric_lookup (const ArrayT& array, const ArrayT& values,
                    bool left_inf, bool right_inf,
--- a/libinterp/corefcn/ls-mat5.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/ls-mat5.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -252,7 +252,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 read_mat5_integer_data (std::istream& is, T *m, octave_idx_type count,
                         bool swap, mat5_data_type type)
@@ -1771,7 +1771,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 write_mat5_integer_data (std::ostream& os, const T *m, int size,
                          octave_idx_type nel)
--- a/libinterp/corefcn/ls-oct-text.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/ls-oct-text.h	Sun Jan 24 13:50:04 2016 -0500
@@ -68,7 +68,7 @@
 //
 //  [%#][ \t]*keyword[ \t]*int-value.*\n
 
-template <class T>
+template <typename T>
 bool
 extract_keyword (std::istream& is, const char *keyword, T& value,
                  const bool next_only = false)
@@ -115,7 +115,7 @@
   return status;
 }
 
-template <class T>
+template <typename T>
 bool
 extract_keyword (std::istream& is, const std::string& kw, T& value,
                  const bool next_only = false)
@@ -131,7 +131,7 @@
 //
 //  [%#][ \t]*keyword[ \t]*int-value.*\n
 
-template <class T>
+template <typename T>
 bool
 extract_keyword (std::istream& is, const string_vector& keywords,
                  std::string& kw, T& value, const bool next_only = false)
--- a/libinterp/corefcn/lu.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/lu.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -39,7 +39,7 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
-template <class MT>
+template <typename MT>
 static octave_value
 get_lu_l (const base_lu<MT>& fact)
 {
@@ -50,7 +50,7 @@
     return L;
 }
 
-template <class MT>
+template <typename MT>
 static octave_value
 get_lu_u (const base_lu<MT>& fact)
 {
--- a/libinterp/corefcn/max.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/max.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -41,7 +41,7 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
-template <class ArrayType>
+template <typename ArrayType>
 static octave_value_list
 do_minmax_red_op (const octave_value& arg,
                   int nargout, int dim, bool ismin)
@@ -138,7 +138,7 @@
   return retval;
 }
 
-template <class ArrayType>
+template <typename ArrayType>
 static octave_value
 do_minmax_bin_op (const octave_value& argx, const octave_value& argy,
                   bool ismin)
@@ -866,7 +866,7 @@
 
 */
 
-template <class ArrayType>
+template <typename ArrayType>
 static octave_value_list
 do_cumminmax_red_op (const octave_value& arg,
                      int nargout, int dim, bool ismin)
--- a/libinterp/corefcn/mgorth.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/mgorth.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -30,7 +30,7 @@
 #include "error.h"
 #include "errwarn.h"
 
-template <class ColumnVector, class Matrix, class RowVector>
+template <typename ColumnVector, typename Matrix, typename RowVector>
 static void
 do_mgorth (ColumnVector& x, const Matrix& V, RowVector& h)
 {
--- a/libinterp/corefcn/oct-map.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/oct-map.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -623,7 +623,7 @@
     dest = src.orderfields (ref, perm);
 }
 
-template <class map>
+template <typename map>
 static void
 permute_to_correct_order (octave_idx_type n, octave_idx_type nf,
                           octave_idx_type idx, const map *map_list,
--- a/libinterp/corefcn/oct-map.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/oct-map.h	Sun Jan 24 13:50:04 2016 -0500
@@ -254,7 +254,7 @@
 
 };
 
-template<>
+template <>
 inline octave_scalar_map
 octave_value_extract<octave_scalar_map> (const octave_value& v)
 { return v.scalar_map_value (); }
@@ -469,7 +469,7 @@
                       const octave_map *map_list, octave_map& retval);
 };
 
-template<>
+template <>
 inline octave_map octave_value_extract<octave_map> (const octave_value& v)
 { return v.map_value (); }
 
--- a/libinterp/corefcn/oct-stream.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/oct-stream.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -1109,7 +1109,7 @@
 
 #define OCTAVE_SCAN(is, fmt, arg) octave_scan (is, fmt, arg)
 
-template <class T>
+template <typename T>
 std::istream&
 octave_scan_1 (std::istream& is, const scanf_format_elt& fmt, T* valptr)
 {
@@ -1181,7 +1181,7 @@
   return is;
 }
 
-template <class T>
+template <typename T>
 std::istream&
 octave_scan (std::istream& is, const scanf_format_elt& fmt, T* valptr)
 {
@@ -1207,7 +1207,7 @@
 // Note that this specialization is only used for reading characters, not
 // character strings. See BEGIN_S_CONVERSION for details.
 
-template<>
+template <>
 std::istream&
 octave_scan<> (std::istream& is, const scanf_format_elt& /* fmt */,
                char* valptr)
@@ -1215,7 +1215,7 @@
   return is >> valptr;
 }
 
-template<>
+template <>
 std::istream&
 octave_scan<> (std::istream& is, const scanf_format_elt& fmt, double* valptr)
 {
@@ -1249,7 +1249,7 @@
   return is;
 }
 
-template <class T>
+template <typename T>
 void
 do_scanf_conv (std::istream& is, const scanf_format_elt& fmt,
                T valptr, Matrix& mval, double *data, octave_idx_type& idx,
@@ -2352,7 +2352,7 @@
 
 // Ugh again and again.
 
-template <class T>
+template <typename T>
 int
 do_printf_conv (std::ostream& os, const char *fmt, int nsa, int sa_1,
                 int sa_2, T arg, const std::string& who)
@@ -3093,7 +3093,7 @@
     rep->close ();
 }
 
-template <class SRC_T, class DST_T>
+template <typename SRC_T, typename DST_T>
 static octave_value
 convert_and_copy (std::list<void *>& input_buf_list,
                   octave_idx_type input_buf_elts,
@@ -3499,7 +3499,7 @@
   return retval;
 }
 
-template <class T, class V>
+template <typename T, typename V>
 static void
 convert_chars (const void *data, void *conv_data, octave_idx_type n_elts)
 {
@@ -3511,7 +3511,7 @@
     vt_data[i] = tt_data[i];
 }
 
-template <class T, class V>
+template <typename T, typename V>
 static void
 convert_ints (const T *data, void *conv_data, octave_idx_type n_elts,
               bool swap)
@@ -3532,21 +3532,21 @@
     }
 }
 
-template <class T>
+template <typename T>
 class ultimate_element_type
 {
 public:
   typedef T type;
 };
 
-template <class T>
+template <typename T>
 class ultimate_element_type<octave_int<T> >
 {
 public:
   typedef T type;
 };
 
-template <class T>
+template <typename T>
 static bool
 convert_data (const T *data, void *conv_data, octave_idx_type n_elts,
               oct_data_conv::data_type output_type,
@@ -3710,7 +3710,7 @@
   return status;
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 octave_stream::write (const Array<T>& data, octave_idx_type block_size,
                       oct_data_conv::data_type output_type,
--- a/libinterp/corefcn/oct-stream.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/oct-stream.h	Sun Jan 24 13:50:04 2016 -0500
@@ -564,7 +564,7 @@
 
   bool skip_bytes (size_t n_elts);
 
-  template <class T>
+  template <typename T>
   octave_idx_type write (const Array<T>& data, octave_idx_type block_size,
                          oct_data_conv::data_type output_type,
                          octave_idx_type skip,
--- a/libinterp/corefcn/octave-link.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/octave-link.h	Sun Jan 24 13:50:04 2016 -0500
@@ -99,21 +99,21 @@
     return retval;
   }
 
-  template <class T>
+  template <typename T>
   static void post_event (T *obj, void (T::*method) (void))
   {
     if (enabled ())
       instance->do_post_event (obj, method);
   }
 
-  template <class T, class A>
+  template <typename T, typename A>
   static void post_event (T *obj, void (T::*method) (A), A arg)
   {
     if (enabled ())
       instance->do_post_event (obj, method, arg);
   }
 
-  template <class T, class A>
+  template <typename T, typename A>
   static void post_event (T *obj, void (T::*method) (const A&), const A& arg)
   {
     if (enabled ())
@@ -375,19 +375,19 @@
   void do_process_events (void);
   void do_discard_events (void);
 
-  template <class T>
+  template <typename T>
   void do_post_event (T *obj, void (T::*method) (void))
   {
     gui_event_queue.add_method (obj, method);
   }
 
-  template <class T, class A>
+  template <typename T, typename A>
   void do_post_event (T *obj, void (T::*method) (A), A arg)
   {
     gui_event_queue.add_method (obj, method, arg);
   }
 
-  template <class T, class A>
+  template <typename T, typename A>
   void do_post_event (T *obj, void (T::*method) (const A&), const A& arg)
   {
     gui_event_queue.add_method (obj, method, arg);
--- a/libinterp/corefcn/pr-output.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/pr-output.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -1703,7 +1703,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 /* static */ inline void
 pr_plus_format (std::ostream& os, const T& val)
 {
@@ -2970,7 +2970,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 class
 octave_print_conv
 {
@@ -2992,7 +2992,7 @@
 
 #undef PRINT_CONV
 
-template <class T>
+template <typename T>
 /* static */ inline void
 pr_int (std::ostream& os, const T& d, int fw = 0)
 {
@@ -3061,7 +3061,7 @@
 //
 // from GCC.  Isn't there a better way?
 
-template <class T>
+template <typename T>
 /* static */ inline T
 abs (T x)
 {
@@ -3115,7 +3115,7 @@
 template void
 pr_int (std::ostream&, const octave_uint64&, int);
 
-template <class T>
+template <typename T>
 void
 octave_print_internal_template (std::ostream& os, const octave_int<T>& val,
                                 bool)
@@ -3149,7 +3149,7 @@
 PRINT_INT_SCALAR_INTERNAL (int64_t)
 PRINT_INT_SCALAR_INTERNAL (uint64_t)
 
-template <class T>
+template <typename T>
 /* static */ inline void
 octave_print_internal_template (std::ostream& os, const intNDArray<T>& nda,
                                 bool pr_as_read_syntax, int extra_indent)
--- a/libinterp/corefcn/profiler.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/profiler.h	Sun Jan 24 13:50:04 2016 -0500
@@ -40,7 +40,7 @@
 
   // This is a utility class that can be used to call the enter/exit
   // functions in a manner protected from stack unwinding.
-  template<class T> class enter
+  template <typename T> class enter
   {
   private:
 
--- a/libinterp/corefcn/schur.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/schur.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -37,7 +37,7 @@
 #include "ovl.h"
 #include "utils.h"
 
-template <class Matrix>
+template <typename Matrix>
 static octave_value
 mark_upper_triangular (const Matrix& a)
 {
--- a/libinterp/corefcn/sparse-xdiv.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/sparse-xdiv.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -47,7 +47,7 @@
   warn_singular_matrix (rcond);
 }
 
-template <class T1, class T2>
+template <typename T1, typename T2>
 bool
 mx_leftdiv_conform (const T1& a, const T2& b)
 {
@@ -81,7 +81,7 @@
 INSTANTIATE_MX_LEFTDIV_CONFORM (ComplexDiagMatrix, SparseMatrix);
 INSTANTIATE_MX_LEFTDIV_CONFORM (ComplexDiagMatrix, SparseComplexMatrix);
 
-template <class T1, class T2>
+template <typename T1, typename T2>
 bool
 mx_div_conform (const T1& a, const T2& b)
 {
--- a/libinterp/corefcn/sparse-xpow.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/sparse-xpow.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -228,7 +228,7 @@
 // seem worth the effort to optimize -- how often does this case come up
 // in practice?
 
-template <class S, class SM>
+template <typename S, typename SM>
 inline octave_value
 scalar_xpow (const S& a, const SM& b)
 {
--- a/libinterp/corefcn/sqrtm.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/sqrtm.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -39,7 +39,7 @@
 #include "utils.h"
 #include "xnorm.h"
 
-template <class Matrix>
+template <typename Matrix>
 static void
 sqrtm_utri_inplace (Matrix& T)
 {
@@ -88,7 +88,7 @@
                      "sqrtm: matrix is singular, may not have a square root");
 }
 
-template <class Matrix, class ComplexMatrix, class ComplexSCHUR>
+template <typename Matrix, typename ComplexMatrix, typename ComplexSCHUR>
 static octave_value
 do_sqrtm (const octave_value& arg)
 {
--- a/libinterp/corefcn/symtab.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/symtab.h	Sun Jan 24 13:50:04 2016 -0500
@@ -850,7 +850,7 @@
         built_in_function = f;
       }
 
-      template <class T>
+      template <typename T>
       void
       clear_map (std::map<T, octave_value>& map, bool force = false)
       {
--- a/libinterp/corefcn/tril.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/tril.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -38,7 +38,7 @@
 #include "ovl.h"
 
 // The bulk of the work.
-template <class T>
+template <typename T>
 static Array<T>
 do_tril (const Array<T>& a, octave_idx_type k, bool pack)
 {
@@ -80,7 +80,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 static Array<T>
 do_triu (const Array<T>& a, octave_idx_type k, bool pack)
 {
@@ -126,7 +126,7 @@
 // These two are by David Bateman.
 // FIXME: optimizations possible. "pack" support missing.
 
-template <class T>
+template <typename T>
 static Sparse<T>
 do_tril (const Sparse<T>& a, octave_idx_type k, bool pack)
 {
@@ -146,7 +146,7 @@
   return m;
 }
 
-template <class T>
+template <typename T>
 static Sparse<T>
 do_triu (const Sparse<T>& a, octave_idx_type k, bool pack)
 {
@@ -166,14 +166,14 @@
 }
 
 // Convenience dispatchers.
-template <class T>
+template <typename T>
 static Array<T>
 do_trilu (const Array<T>& a, octave_idx_type k, bool lower, bool pack)
 {
   return lower ? do_tril (a, k, pack) : do_triu (a, k, pack);
 }
 
-template <class T>
+template <typename T>
 static Sparse<T>
 do_trilu (const Sparse<T>& a, octave_idx_type k, bool lower, bool pack)
 {
--- a/libinterp/corefcn/typecast.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/typecast.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -46,7 +46,7 @@
     return dim_vector (n, 1);
 }
 
-template <class ArrayType>
+template <typename ArrayType>
 static void
 get_data_and_bytesize (const ArrayType& array,
                        const void *& data,
@@ -64,7 +64,7 @@
   old_dims = array.dims ();
 }
 
-template <class ArrayType>
+template <typename ArrayType>
 static ArrayType
 reinterpret_copy (const void *data, octave_idx_type byte_size,
                   const dim_vector& old_dims)
@@ -256,7 +256,7 @@
   return retval;
 }
 
-template <class ArrayType>
+template <typename ArrayType>
 ArrayType
 do_bitpack (const boolNDArray& bitp)
 {
@@ -376,7 +376,7 @@
   return retval;
 }
 
-template <class ArrayType>
+template <typename ArrayType>
 boolNDArray
 do_bitunpack (const ArrayType& array)
 {
--- a/libinterp/corefcn/variables.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/variables.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -734,7 +734,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool try_local_protect (T& var)
 {
   octave_user_code *curr_usr_code = octave_call_stack::caller_user_code ();
--- a/libinterp/corefcn/xdiv.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/xdiv.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -62,7 +62,7 @@
   warn_singular_matrix (rcond);
 }
 
-template <class T1, class T2>
+template <typename T1, typename T2>
 bool
 mx_leftdiv_conform (const T1& a, const T2& b, blas_trans_type blas_trans)
 {
@@ -89,7 +89,7 @@
 INSTANTIATE_MX_LEFTDIV_CONFORM (ComplexMatrix, Matrix);
 INSTANTIATE_MX_LEFTDIV_CONFORM (ComplexMatrix, ComplexMatrix);
 
-template <class T1, class T2>
+template <typename T1, typename T2>
 bool
 mx_div_conform (const T1& a, const T2& b)
 {
@@ -703,7 +703,7 @@
 
 // Diagonal matrix division.
 
-template <class MT, class DMT>
+template <typename MT, typename DMT>
 MT
 mdm_div_impl (const MT& a, const DMT& d)
 {
@@ -786,7 +786,7 @@
 xdiv (const FloatComplexMatrix& a, const FloatComplexDiagMatrix& b)
 { return mdm_div_impl (a, b); }
 
-template <class MT, class DMT>
+template <typename MT, typename DMT>
 MT
 dmm_leftdiv_impl (const DMT& d, const MT& a)
 {
@@ -866,7 +866,7 @@
 
 // Diagonal by diagonal matrix division.
 
-template <class MT, class DMT>
+template <typename MT, typename DMT>
 MT
 dmdm_div_impl (const MT& a, const DMT& d)
 {
@@ -941,7 +941,7 @@
 xdiv (const FloatComplexDiagMatrix& a, const FloatComplexDiagMatrix& b)
 { return dmdm_div_impl (a, b); }
 
-template <class MT, class DMT>
+template <typename MT, typename DMT>
 MT
 dmdm_leftdiv_impl (const DMT& d, const MT& a)
 {
--- a/libinterp/corefcn/zfstream.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/corefcn/zfstream.h	Sun Jan 24 13:50:04 2016 -0500
@@ -448,7 +448,7 @@
  *  This class defines a two-argument manipulator for gzofstream. It is used
  *  as base for the setcompression(int,int) manipulator.
 */
-template<typename T1, typename T2>
+template <typename T1, typename T2>
 class gzomanip2
 {
 public:
@@ -481,7 +481,7 @@
 }
 
 // Manipulator constructor stores arguments
-template<typename T1, typename T2>
+template <typename T1, typename T2>
 inline
 gzomanip2<T1,T2>::gzomanip2 (gzofstream &(*f)(gzofstream &, T1, T2),
                              T1 v1,
@@ -490,7 +490,7 @@
 { }
 
 // Insertor applies underlying manipulator function to stream
-template<typename T1, typename T2>
+template <typename T1, typename T2>
 inline gzofstream&
 operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
 { return (*m.func)(s, m.val1, m.val2); }
--- a/libinterp/dldfcn/__init_fltk__.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/dldfcn/__init_fltk__.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -653,7 +653,7 @@
       }
   }
 
-  template <class T_prop>
+  template <typename T_prop>
   void remove_from_menu (T_prop& prop)
   {
     Matrix kids;
--- a/libinterp/dldfcn/__magick_read__.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/dldfcn/__magick_read__.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -209,7 +209,7 @@
   return maps;
 }
 
-template <class T>
+template <typename T>
 static octave_value_list
 read_indexed_images (const std::vector<Magick::Image>& imvec,
                      const Array<octave_idx_type>& frameidx,
@@ -304,7 +304,7 @@
 // very similar to account for different image types. They are different
 // enough that trying to reduce the copy and paste would decrease its
 // readability too much.
-template <class T>
+template <typename T>
 octave_value_list
 read_images (std::vector<Magick::Image>& imvec,
              const Array<octave_idx_type>& frameidx,
@@ -860,7 +860,7 @@
 
 #ifdef HAVE_MAGICK
 
-template <class T>
+template <typename T>
 static uint32NDArray
 img_float2uint (const T& img)
 {
@@ -880,7 +880,7 @@
 
 // Gets the bitdepth to be used for an Octave class, i.e, returns 8 for
 // uint8, 16 for uint16, and 32 for uint32
-template <class T>
+template <typename T>
 static octave_idx_type
 bitdepth_from_class ()
 {
@@ -921,7 +921,7 @@
   return img;
 }
 
-template <class T>
+template <typename T>
 static void
 encode_indexed_images (std::vector<Magick::Image>& imvec,
                        const T& img,
@@ -1037,7 +1037,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 static void
 encode_uint_image (std::vector<Magick::Image>& imvec,
                    const T& img, const T& alpha)
--- a/libinterp/dldfcn/chol.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/dldfcn/chol.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -44,14 +44,14 @@
 #include "ovl.h"
 #include "utils.h"
 
-template <class CHOLT>
+template <typename CHOLT>
 static octave_value
 get_chol (const CHOLT& fact)
 {
   return octave_value (fact.chol_matrix());
 }
 
-template <class CHOLT>
+template <typename CHOLT>
 static octave_value
 get_chol_r (const CHOLT& fact)
 {
@@ -59,7 +59,7 @@
                        MatrixType (MatrixType::Upper));
 }
 
-template <class CHOLT>
+template <typename CHOLT>
 static octave_value
 get_chol_l (const CHOLT& fact)
 {
--- a/libinterp/dldfcn/qr.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/dldfcn/qr.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -44,7 +44,7 @@
 #include "ovl.h"
 #include "utils.h"
 
-template <class MT>
+template <typename MT>
 static octave_value
 get_qr_r (const base_qr<MT>& fact)
 {
--- a/libinterp/octave-value/ov-base-diag.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-diag.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -41,7 +41,7 @@
 
 #include "ls-oct-text.h"
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::subsref (const std::string& type,
                                     const std::list<octave_value_list>& idx)
@@ -70,7 +70,7 @@
 }
 
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT,MT>::diag (octave_idx_type k) const
 {
@@ -95,7 +95,7 @@
 }
 
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::do_index_op (const octave_value_list& idx,
                                         bool resize_ok)
@@ -143,7 +143,7 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::subsasgn (const std::string& type,
                                      const std::list<octave_value_list>& idx,
@@ -257,7 +257,7 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::resize (const dim_vector& dv, bool fill) const
 {
@@ -273,7 +273,7 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 bool
 octave_base_diag<DMT, MT>::is_true (void) const
 {
@@ -281,15 +281,15 @@
 }
 
 // FIXME: This should be achieveable using ::real
-template <class T> inline T helper_getreal (T x) { return x; }
-template <class T> inline T helper_getreal (std::complex<T> x)
+template <typename T> inline T helper_getreal (T x) { return x; }
+template <typename T> inline T helper_getreal (std::complex<T> x)
 { return x.real (); }
 // FIXME: We really need some traits so that ad hoc hooks like this
 //        are not necessary.
-template <class T> inline T helper_iscomplex (T) { return false; }
-template <class T> inline T helper_iscomplex (std::complex<T>) { return true; }
+template <typename T> inline T helper_iscomplex (T) { return false; }
+template <typename T> inline T helper_iscomplex (std::complex<T>) { return true; }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 double
 octave_base_diag<DMT, MT>::double_value (bool force_conversion) const
 {
@@ -311,7 +311,7 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 float
 octave_base_diag<DMT, MT>::float_value (bool force_conversion) const
 {
@@ -335,7 +335,7 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 Complex
 octave_base_diag<DMT, MT>::complex_value (bool) const
 {
@@ -354,7 +354,7 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 FloatComplex
 octave_base_diag<DMT, MT>::float_complex_value (bool) const
 {
@@ -373,98 +373,98 @@
   return retval;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 Matrix
 octave_base_diag<DMT, MT>::matrix_value (bool) const
 {
   return Matrix (diag_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 FloatMatrix
 octave_base_diag<DMT, MT>::float_matrix_value (bool) const
 {
   return FloatMatrix (float_diag_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 ComplexMatrix
 octave_base_diag<DMT, MT>::complex_matrix_value (bool) const
 {
   return ComplexMatrix (complex_diag_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 FloatComplexMatrix
 octave_base_diag<DMT, MT>::float_complex_matrix_value (bool) const
 {
   return FloatComplexMatrix (float_complex_diag_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 NDArray
 octave_base_diag<DMT, MT>::array_value (bool) const
 {
   return NDArray (matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 FloatNDArray
 octave_base_diag<DMT, MT>::float_array_value (bool) const
 {
   return FloatNDArray (float_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 ComplexNDArray
 octave_base_diag<DMT, MT>::complex_array_value (bool) const
 {
   return ComplexNDArray (complex_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 FloatComplexNDArray
 octave_base_diag<DMT, MT>::float_complex_array_value (bool) const
 {
   return FloatComplexNDArray (float_complex_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 boolNDArray
 octave_base_diag<DMT, MT>::bool_array_value (bool warn) const
 {
   return to_dense ().bool_array_value (warn);
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 charNDArray
 octave_base_diag<DMT, MT>::char_array_value (bool warn) const
 {
   return to_dense ().char_array_value (warn);
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 SparseMatrix
 octave_base_diag<DMT, MT>::sparse_matrix_value (bool) const
 {
   return SparseMatrix (diag_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 SparseComplexMatrix
 octave_base_diag<DMT, MT>::sparse_complex_matrix_value (bool) const
 {
   return SparseComplexMatrix (complex_diag_matrix_value ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 idx_vector
 octave_base_diag<DMT, MT>::index_vector (bool require_integers) const
 {
   return to_dense ().index_vector (require_integers);
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::convert_to_str_internal (bool pad, bool force,
                                                     char type) const
@@ -472,7 +472,7 @@
   return to_dense ().convert_to_str_internal (pad, force, type);
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 bool
 octave_base_diag<DMT, MT>::save_ascii (std::ostream& os)
 {
@@ -484,7 +484,7 @@
   return true;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 bool
 octave_base_diag<DMT, MT>::load_ascii (std::istream& is)
 {
@@ -515,7 +515,7 @@
   return true;
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 void
 octave_base_diag<DMT, MT>::print_raw (std::ostream& os,
                                       bool pr_as_read_syntax) const
@@ -524,14 +524,14 @@
                                 current_print_indent_level ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 mxArray *
 octave_base_diag<DMT, MT>::as_mxArray (void) const
 {
   return to_dense ().as_mxArray ();
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 bool
 octave_base_diag<DMT, MT>::print_as_scalar (void) const
 {
@@ -540,14 +540,14 @@
   return (dv.all_ones () || dv.any_zero ());
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 void
 octave_base_diag<DMT, MT>::print (std::ostream& os, bool pr_as_read_syntax)
 {
   print_raw (os, pr_as_read_syntax);
   newline (os);
 }
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 int
 octave_base_diag<DMT, MT>::write (octave_stream& os, int block_size,
                                   oct_data_conv::data_type output_type,
@@ -557,7 +557,7 @@
   return to_dense ().write (os, block_size, output_type, skip, flt_fmt);
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 void
 octave_base_diag<DMT, MT>::print_info (std::ostream& os,
                                        const std::string& prefix) const
@@ -565,7 +565,7 @@
   matrix.print_info (os, prefix);
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::fast_elem_extract (octave_idx_type n) const
 {
@@ -582,7 +582,7 @@
     return octave_value ();
 }
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 octave_value
 octave_base_diag<DMT, MT>::to_dense (void) const
 {
--- a/libinterp/octave-value/ov-base-diag.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-diag.h	Sun Jan 24 13:50:04 2016 -0500
@@ -39,7 +39,7 @@
 
 // Real matrix values.
 
-template <class DMT, class MT>
+template <typename DMT, typename MT>
 class
 octave_base_diag : public octave_base_value
 {
--- a/libinterp/octave-value/ov-base-int.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-int.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -61,7 +61,7 @@
 // about comparisons always false due to limited range of data types.
 // Ugh.  The cure may be worse than the disease.
 
-template <class T, bool is_signed = true, bool can_be_too_big = true>
+template <typename T, bool is_signed = true, bool can_be_too_big = true>
 struct octave_base_int_helper
 {
   static bool
@@ -71,13 +71,13 @@
   }
 };
 
-template <class T>
+template <typename T>
 struct octave_base_int_helper<T, false, false>
 {
   static bool char_value_out_of_range (T) { return false; }
 };
 
-template <class T>
+template <typename T>
 struct octave_base_int_helper<T, false, true>
 {
   static bool char_value_out_of_range (T val)
@@ -86,7 +86,7 @@
   }
 };
 
-template <class T>
+template <typename T>
 struct octave_base_int_helper<T, true, false>
 {
   static bool char_value_out_of_range (T val) { return val < 0; }
@@ -98,7 +98,7 @@
 // are still OK, but will see the warnings again for any other types
 // that do not meet this assumption.
 
-template <class T>
+template <typename T>
 struct octave_base_int_helper_traits
 {
   static const bool can_be_larger_than_uchar_max = true;
@@ -123,7 +123,7 @@
 };
 
 
-template <class T>
+template <typename T>
 octave_base_value *
 octave_base_int_matrix<T>::try_narrowing_conversion (void)
 {
@@ -136,7 +136,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_int_matrix<T>::convert_to_str_internal (bool, bool, char type) const
 {
@@ -184,7 +184,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_matrix<T>::save_ascii (std::ostream& os)
 {
@@ -200,7 +200,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_matrix<T>::load_ascii (std::istream& is)
 {
@@ -230,7 +230,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_matrix<T>::save_binary (std::ostream& os, bool&)
 {
@@ -253,7 +253,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_matrix<T>::load_binary (std::istream& is, bool swap,
                                         oct_mach_info::float_format)
@@ -323,7 +323,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_matrix<T>::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
 {
@@ -375,7 +375,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_matrix<T>::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
@@ -444,7 +444,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 void
 octave_base_int_matrix<T>::print_raw (std::ostream& os,
                                       bool pr_as_read_syntax) const
@@ -453,7 +453,7 @@
                          this->current_print_indent_level ());
 }
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_int_scalar<T>::convert_to_str_internal (bool, bool, char type) const
 {
@@ -484,7 +484,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_scalar<T>::save_ascii (std::ostream& os)
 {
@@ -492,7 +492,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_scalar<T>::load_ascii (std::istream& is)
 {
@@ -503,7 +503,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_scalar<T>::save_binary (std::ostream& os, bool&)
 {
@@ -511,7 +511,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_scalar<T>::load_binary (std::istream& is, bool swap,
                                         oct_mach_info::float_format)
@@ -540,7 +540,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_scalar<T>::save_hdf5 (octave_hdf5_id loc_id, const char *name, bool)
 {
@@ -582,7 +582,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_int_scalar<T>::load_hdf5 (octave_hdf5_id loc_id, const char *name)
 {
--- a/libinterp/octave-value/ov-base-int.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-int.h	Sun Jan 24 13:50:04 2016 -0500
@@ -39,7 +39,7 @@
 
 // base int matrix values.
 
-template <class T>
+template <typename T>
 class
 octave_base_int_matrix : public octave_base_matrix<T>
 {
@@ -85,7 +85,7 @@
 
 // base int scalar values.
 
-template <class T>
+template <typename T>
 class
 octave_base_int_scalar : public octave_base_scalar<T>
 {
--- a/libinterp/octave-value/ov-base-mat.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-mat.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -37,7 +37,7 @@
 #include "ov-base-scalar.h"
 #include "pr-output.h"
 
-template <class MT>
+template <typename MT>
 octave_value
 octave_base_matrix<MT>::subsref (const std::string& type,
                                  const std::list<octave_value_list>& idx)
@@ -65,7 +65,7 @@
   return retval.next_subsref (type, idx);
 }
 
-template <class MT>
+template <typename MT>
 octave_value
 octave_base_matrix<MT>::subsasgn (const std::string& type,
                                   const std::list<octave_value_list>& idx,
@@ -124,7 +124,7 @@
   return retval;
 }
 
-template <class MT>
+template <typename MT>
 octave_value
 octave_base_matrix<MT>::do_index_op (const octave_value_list& idx,
                                      bool resize_ok)
@@ -208,7 +208,7 @@
   return retval;
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_matrix<MT>::assign (const octave_value_list& idx, const MT& rhs)
 {
@@ -268,7 +268,7 @@
   clear_cached_info ();
 }
 
-template <class MT>
+template <typename MT>
 MatrixType
 octave_base_matrix<MT>::matrix_type (const MatrixType& _typ) const
 {
@@ -277,7 +277,7 @@
   return *typ;
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_matrix<MT>::assign (const octave_value_list& idx,
                                 typename MT::element_type rhs)
@@ -372,7 +372,7 @@
   clear_cached_info ();
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_matrix<MT>::delete_elements (const octave_value_list& idx)
 {
@@ -389,7 +389,7 @@
   clear_cached_info ();
 }
 
-template <class MT>
+template <typename MT>
 octave_value
 octave_base_matrix<MT>::resize (const dim_vector& dv, bool fill) const
 {
@@ -401,7 +401,7 @@
   return retval;
 }
 
-template <class MT>
+template <typename MT>
 bool
 octave_base_matrix<MT>::is_true (void) const
 {
@@ -424,7 +424,7 @@
   return retval;
 }
 
-template <class MT>
+template <typename MT>
 bool
 octave_base_matrix<MT>::print_as_scalar (void) const
 {
@@ -433,7 +433,7 @@
   return (dv.all_ones () || dv.any_zero ());
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_matrix<MT>::print (std::ostream& os, bool pr_as_read_syntax)
 {
@@ -441,7 +441,7 @@
   newline (os);
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_matrix<MT>::print_info (std::ostream& os,
                                     const std::string& prefix) const
@@ -449,7 +449,7 @@
   matrix.print_info (os, prefix);
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_matrix<MT>::short_disp (std::ostream& os) const
 {
@@ -501,7 +501,7 @@
     os << "...";
 }
 
-template <class MT>
+template <typename MT>
 octave_value
 octave_base_matrix<MT>::fast_elem_extract (octave_idx_type n) const
 {
@@ -511,7 +511,7 @@
     return octave_value ();
 }
 
-template <class MT>
+template <typename MT>
 bool
 octave_base_matrix<MT>::fast_elem_insert (octave_idx_type n,
                                           const octave_value& x)
--- a/libinterp/octave-value/ov-base-mat.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-mat.h	Sun Jan 24 13:50:04 2016 -0500
@@ -42,7 +42,7 @@
 
 // Real matrix values.
 
-template <class MT>
+template <typename MT>
 class
 octave_base_matrix : public octave_base_value
 {
--- a/libinterp/octave-value/ov-base-scalar.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-scalar.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -33,7 +33,7 @@
 #include "ov-base-scalar.h"
 #include "pr-output.h"
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::subsref (const std::string& type,
                                  const std::list<octave_value_list>& idx)
@@ -61,7 +61,7 @@
   return retval.next_subsref (type, idx);
 }
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::subsasgn (const std::string& type,
                                   const std::list<octave_value_list>& idx,
@@ -99,35 +99,35 @@
   return retval;
 }
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::permute (const Array<int>& vec, bool inv) const
 {
   return Array<ST> (dim_vector (1, 1), scalar).permute (vec, inv);
 }
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::reshape (const dim_vector& new_dims) const
 {
   return Array<ST> (dim_vector (1, 1), scalar).reshape (new_dims);
 }
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::diag (octave_idx_type k) const
 {
   return Array<ST> (dim_vector (1, 1), scalar).diag (k);
 }
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::diag (octave_idx_type m, octave_idx_type n) const
 {
   return Array<ST> (dim_vector (1, 1), scalar).diag (m, n);
 }
 
-template <class ST>
+template <typename ST>
 bool
 octave_base_scalar<ST>::is_true (void) const
 {
@@ -137,7 +137,7 @@
   return (scalar != ST ());
 }
 
-template <class ST>
+template <typename ST>
 void
 octave_base_scalar<ST>::print (std::ostream& os, bool pr_as_read_syntax)
 {
@@ -145,7 +145,7 @@
   newline (os);
 }
 
-template <class ST>
+template <typename ST>
 void
 octave_base_scalar<ST>::print_raw (std::ostream& os,
                                    bool pr_as_read_syntax) const
@@ -154,7 +154,7 @@
   octave_print_internal (os, scalar, pr_as_read_syntax);
 }
 
-template <class ST>
+template <typename ST>
 bool
 octave_base_scalar<ST>::print_name_tag (std::ostream& os,
                                         const std::string& name) const
@@ -164,7 +164,7 @@
   return false;
 }
 
-template <class ST>
+template <typename ST>
 void
 octave_base_scalar<ST>::short_disp (std::ostream& os) const
 {
@@ -178,14 +178,14 @@
     os << tmp[0];
 }
 
-template <class ST>
+template <typename ST>
 octave_value
 octave_base_scalar<ST>::fast_elem_extract (octave_idx_type n) const
 {
   return (n == 0) ? octave_value (scalar) : octave_value ();
 }
 
-template <class ST>
+template <typename ST>
 bool
 octave_base_scalar<ST>::fast_elem_insert_self (void *where,
                                                builtin_type_t btyp) const
--- a/libinterp/octave-value/ov-base-scalar.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-scalar.h	Sun Jan 24 13:50:04 2016 -0500
@@ -38,7 +38,7 @@
 
 // Real scalar values.
 
-template <class ST>
+template <typename ST>
 class
 octave_base_scalar : public octave_base_value
 {
--- a/libinterp/octave-value/ov-base-sparse.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-sparse.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -47,7 +47,7 @@
 
 #include "lo-array-errwarn.h"
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_sparse<T>::do_index_op (const octave_value_list& idx,
                                     bool resize_ok)
@@ -103,7 +103,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_sparse<T>::subsref (const std::string& type,
                                 const std::list<octave_value_list>& idx)
@@ -131,7 +131,7 @@
   return retval.next_subsref (type, idx);
 }
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_sparse<T>::subsasgn (const std::string& type,
                                  const std::list<octave_value_list>& idx,
@@ -176,7 +176,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 void
 octave_base_sparse<T>::assign (const octave_value_list& idx, const T& rhs)
 {
@@ -230,7 +230,7 @@
   typ.invalidate_type ();
 }
 
-template <class MT>
+template <typename MT>
 void
 octave_base_sparse<MT>::delete_elements (const octave_value_list& idx)
 {
@@ -282,7 +282,7 @@
   typ.invalidate_type ();
 }
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_sparse<T>::resize (const dim_vector& dv, bool) const
 {
@@ -291,7 +291,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_sparse<T>::is_true (void) const
 {
@@ -312,7 +312,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_sparse<T>::print_as_scalar (void) const
 {
@@ -321,7 +321,7 @@
   return (dv.all_ones () || dv.any_zero ());
 }
 
-template <class T>
+template <typename T>
 void
 octave_base_sparse<T>::print (std::ostream& os, bool pr_as_read_syntax)
 {
@@ -329,7 +329,7 @@
   newline (os);
 }
 
-template <class T>
+template <typename T>
 void
 octave_base_sparse<T>::print_info (std::ostream& os,
                                    const std::string& prefix) const
@@ -337,7 +337,7 @@
   matrix.print_info (os, prefix);
 }
 
-template <class T>
+template <typename T>
 void
 octave_base_sparse<T>::print_raw (std::ostream& os,
                                   bool pr_as_read_syntax) const
@@ -419,7 +419,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_sparse<T>::save_ascii (std::ostream& os)
 {
@@ -437,7 +437,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_base_sparse<T>::load_ascii (std::istream& is)
 {
@@ -463,7 +463,7 @@
 }
 
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_sparse<T>::fast_elem_extract (octave_idx_type n) const
 {
@@ -476,7 +476,7 @@
   return (i < nr && j < nc) ? octave_value (matrix(i,j)) : octave_value ();
 }
 
-template <class T>
+template <typename T>
 octave_value
 octave_base_sparse<T>::map (octave_base_value::unary_mapper_t umap) const
 {
--- a/libinterp/octave-value/ov-base-sparse.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base-sparse.h	Sun Jan 24 13:50:04 2016 -0500
@@ -43,7 +43,7 @@
 
 class octave_sparse_bool_matrix;
 
-template <class T>
+template <typename T>
 class
 octave_base_sparse : public octave_base_value
 {
--- a/libinterp/octave-value/ov-base.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-base.h	Sun Jan 24 13:50:04 2016 -0500
@@ -110,7 +110,7 @@
 extern OCTINTERP_API
 builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y);
 
-template <class T>
+template <typename T>
 struct class_to_btyp
 {
   static const builtin_type_t btyp = btyp_unknown;
--- a/libinterp/octave-value/ov-classdef.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-classdef.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -2570,7 +2570,7 @@
     return octave_value (true);
 }
 
-template<class T>
+template <typename T>
 static std::string
 attribute_value_to_string (T* t, octave_value v)
 {
@@ -3289,7 +3289,7 @@
   member_count++;
 }
 
-template<class T1, class T2>
+template <typename T1, typename T2>
 Cell
 map2Cell (const std::map<T1, T2>& m)
 {
--- a/libinterp/octave-value/ov-int-traits.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-int-traits.h	Sun Jan 24 13:50:04 2016 -0500
@@ -33,7 +33,7 @@
 #include "ov-uint32.h"
 #include "ov-uint64.h"
 
-template <class T>
+template <typename T>
 class
 octave_value_int_traits
 {
@@ -42,7 +42,7 @@
 };
 
 #define OCTAVE_VALUE_INT_TRAITS(MT, ST) \
-  template<> \
+  template <> \
   class \
   octave_value_int_traits<MT> \
   { \
--- a/libinterp/octave-value/ov-java.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-java.h	Sun Jan 24 13:50:04 2016 -0500
@@ -28,7 +28,7 @@
 #include <ovl.h>
 #include <ov.h>
 
-template <class T>
+template <typename T>
 class java_local_ref
 {
 public:
--- a/libinterp/octave-value/ov-usr-fcn.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov-usr-fcn.h	Sun Jan 24 13:50:04 2016 -0500
@@ -391,7 +391,7 @@
 
   void accept (tree_walker& tw);
 
-  template <class T>
+  template <typename T>
   bool local_protect (T& variable)
   {
     if (curr_unwind_protect_frame)
--- a/libinterp/octave-value/ov.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -1650,7 +1650,7 @@
                                            type_name (), "real vector"));
 }
 
-template <class T>
+template <typename T>
 static Array<int>
 convert_to_int_array (const Array<octave_int<T> >& A)
 {
@@ -1719,7 +1719,7 @@
                                            type_name (), "integer vector"));
 }
 
-template <class T>
+template <typename T>
 static Array<octave_idx_type>
 convert_to_octave_idx_type_array (const Array<octave_int<T> >& A)
 {
--- a/libinterp/octave-value/ov.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/octave-value/ov.h	Sun Jan 24 13:50:04 2016 -0500
@@ -1539,12 +1539,12 @@
 extern OCTINTERP_API void install_types (void);
 
 // Templated value extractors.
-template<class Value>
+template <typename Value>
 inline Value octave_value_extract (const octave_value&)
 { assert (false); }
 
 #define DEF_VALUE_EXTRACTOR(VALUE,MPREFIX) \
-template<> \
+template <> \
 inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
   { return v.MPREFIX ## _value (); }
 
@@ -1608,7 +1608,7 @@
 #undef DEF_VALUE_EXTRACTOR
 
 #define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \
-template<> \
+template <> \
 inline VALUE octave_value_extract<VALUE> (const octave_value&) \
   { assert (false); return DEFVAL; }
 
--- a/libinterp/operators/op-dms-template.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/operators/op-dms-template.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -48,7 +48,7 @@
 #define MATRIX_VALUE CONCAT2(MATRIXV, _value)
 #define SCALAR_VALUE CONCAT2(SCALARV, _value)
 
-template <class T>
+template <typename T>
 static T
 gripe_if_zero (T x)
 {
--- a/libinterp/parse-tree/oct-parse.in.yy	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/parse-tree/oct-parse.in.yy	Sun Jan 24 13:50:04 2016 -0500
@@ -3939,7 +3939,7 @@
 }
 
 // Finish building a statement.
-template <class T>
+template <typename T>
 tree_statement *
 octave_base_parser::make_statement (T *arg)
 {
--- a/libinterp/parse-tree/parse.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/parse-tree/parse.h	Sun Jan 24 13:50:04 2016 -0500
@@ -377,7 +377,7 @@
   set_stmt_print_flag (tree_statement_list *, char, bool);
 
   // Finish building a statement.
-  template <class T>
+  template <typename T>
   tree_statement *make_statement (T *arg);
 
   // Create a statement list.
--- a/libinterp/parse-tree/pt-mat.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/libinterp/parse-tree/pt-mat.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -664,7 +664,7 @@
                      "concatenation of different character string types may have unintended consequences");
 }
 
-template<class TYPE, class T>
+template <typename TYPE, typename T>
 static void
 single_type_concat (Array<T>& result,
                     tm_const& tmp)
@@ -702,7 +702,7 @@
     }
 }
 
-template<class TYPE, class T>
+template <typename TYPE, typename T>
 static void
 single_type_concat (Array<T>& result,
                     const dim_vector& dv,
@@ -753,7 +753,7 @@
     }
 }
 
-template<class TYPE, class T>
+template <typename TYPE, typename T>
 static void
 single_type_concat (Sparse<T>& result,
                     const dim_vector& dv,
@@ -794,7 +794,7 @@
   result = Sparse<T>::cat (-1, nrows, sparse_row_list);
 }
 
-template<class MAP>
+template <typename MAP>
 static void
 single_type_concat (octave_map& result,
                     const dim_vector& dv,
@@ -832,7 +832,7 @@
   result = octave_map::cat (-1, nrows, map_row_list);
 }
 
-template<class TYPE>
+template <typename TYPE>
 static octave_value
 do_single_type_concat (const dim_vector& dv,
                        tm_const& tmp)
@@ -844,7 +844,7 @@
   return result;
 }
 
-template<>
+template <>
 octave_value
 do_single_type_concat<octave_map> (const dim_vector& dv,
                                    tm_const& tmp)
--- a/liboctave/array/Array-b.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/Array-b.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -34,7 +34,7 @@
 
 // Specialize bool sorting (aka stable partitioning).
 
-template<bool desc>
+template <bool desc>
 static void do_bool_partition (bool *data, octave_idx_type nel)
 {
   octave_idx_type k = 0;
@@ -45,7 +45,7 @@
     data[i] = ! desc;
 }
 
-template<bool desc>
+template <bool desc>
 static void do_bool_partition (bool *data, octave_idx_type *idx,
                                octave_idx_type nel)
 {
@@ -72,7 +72,8 @@
     }
 }
 
-template <> template <>
+template <>
+template <>
 void
 octave_sort<bool>::sort (bool *data, octave_idx_type nel,
                          std::less<bool>)
@@ -80,7 +81,8 @@
   do_bool_partition<false> (data, nel);
 }
 
-template <> template <>
+template <>
+template <>
 void
 octave_sort<bool>::sort (bool *data, octave_idx_type nel,
                          std::greater<bool>)
@@ -88,7 +90,8 @@
   do_bool_partition<true> (data, nel);
 }
 
-template <> template <>
+template <>
+template <>
 void
 octave_sort<bool>::sort (bool *data, octave_idx_type *idx, octave_idx_type nel,
                          std::less<bool>)
@@ -96,7 +99,8 @@
   do_bool_partition<false> (data, idx, nel);
 }
 
-template <> template <>
+template <>
+template <>
 void
 octave_sort<bool>::sort (bool *data, octave_idx_type *idx, octave_idx_type nel,
                          std::greater<bool>)
--- a/liboctave/array/Array.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/Array.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -44,7 +44,7 @@
 // One dimensional array class.  Handles the reference counting for
 // all the derived classes.
 
-template <class T>
+template <typename T>
 Array<T>::Array (const Array<T>& a, const dim_vector& dv)
   : dimensions (dv), rep (a.rep),
     slice_data (a.slice_data), slice_len (a.slice_len)
@@ -65,7 +65,7 @@
   dimensions.chop_trailing_singletons ();
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::fill (const T& val)
 {
@@ -79,7 +79,7 @@
     std::fill_n (slice_data, slice_len, val);
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::clear (void)
 {
@@ -94,7 +94,7 @@
   dimensions = dim_vector ();
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::clear (const dim_vector& dv)
 {
@@ -109,7 +109,7 @@
   dimensions.chop_trailing_singletons ();
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::squeeze (void) const
 {
@@ -162,14 +162,14 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 Array<T>::compute_index (octave_idx_type i, octave_idx_type j) const
 {
   return ::compute_index (i, j, dimensions);
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 Array<T>::compute_index (octave_idx_type i, octave_idx_type j,
                          octave_idx_type k) const
@@ -177,14 +177,14 @@
   return ::compute_index (i, j, k, dimensions);
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 Array<T>::compute_index (const Array<octave_idx_type>& ra_idx) const
 {
   return ::compute_index (ra_idx, dimensions);
 }
 
-template <class T>
+template <typename T>
 T&
 Array<T>::checkelem (octave_idx_type n)
 {
@@ -197,28 +197,28 @@
   return elem (n);
 }
 
-template <class T>
+template <typename T>
 T&
 Array<T>::checkelem (octave_idx_type i, octave_idx_type j)
 {
   return elem (compute_index (i, j));
 }
 
-template <class T>
+template <typename T>
 T&
 Array<T>::checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
 {
   return elem (compute_index (i, j, k));
 }
 
-template <class T>
+template <typename T>
 T&
 Array<T>::checkelem (const Array<octave_idx_type>& ra_idx)
 {
   return elem (compute_index (ra_idx));
 }
 
-template <class T>
+template <typename T>
 typename Array<T>::crefT
 Array<T>::checkelem (octave_idx_type n) const
 {
@@ -231,14 +231,14 @@
   return elem (n);
 }
 
-template <class T>
+template <typename T>
 typename Array<T>::crefT
 Array<T>::checkelem (octave_idx_type i, octave_idx_type j) const
 {
   return elem (compute_index (i, j));
 }
 
-template <class T>
+template <typename T>
 typename Array<T>::crefT
 Array<T>::checkelem (octave_idx_type i, octave_idx_type j,
                      octave_idx_type k) const
@@ -246,14 +246,14 @@
   return elem (compute_index (i, j, k));
 }
 
-template <class T>
+template <typename T>
 typename Array<T>::crefT
 Array<T>::checkelem (const Array<octave_idx_type>& ra_idx) const
 {
   return elem (compute_index (ra_idx));
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::column (octave_idx_type k) const
 {
@@ -266,7 +266,7 @@
   return Array<T> (*this, dim_vector (r, 1), k*r, k*r + r);
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::page (octave_idx_type k) const
 {
@@ -281,7 +281,7 @@
   return Array<T> (*this, dim_vector (r, c), k*p, k*p + p);
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::linear_slice (octave_idx_type lo, octave_idx_type up) const
 {
@@ -349,7 +349,7 @@
   ~rec_permute_helper (void) { delete [] dim; }
 
   // Helper method for fast blocked transpose.
-  template <class T>
+  template <typename T>
   static T *
   blk_trans (const T *src, T *dest, octave_idx_type nr, octave_idx_type nc)
   {
@@ -390,7 +390,7 @@
 private:
 
   // Recursive N-D generalized transpose
-  template <class T>
+  template <typename T>
   T *do_permute (const T *src, T *dest, int lev) const
   {
     if (lev == 0)
@@ -431,12 +431,12 @@
 
 public:
 
-  template <class T>
+  template <typename T>
   void permute (const T *src, T *dest) const { do_permute (src, dest, top); }
 };
 
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::permute (const Array<octave_idx_type>& perm_vec_arg, bool inv) const
 {
@@ -557,7 +557,7 @@
 private:
 
   // Recursive N-D indexing
-  template <class T>
+  template <typename T>
   T *do_index (const T *src, T *dest, int lev) const
   {
     if (lev == 0)
@@ -574,7 +574,7 @@
   }
 
   // Recursive N-D indexed assignment
-  template <class T>
+  template <typename T>
   const T *do_assign (const T *src, T *dest, int lev) const
   {
     if (lev == 0)
@@ -591,7 +591,7 @@
   }
 
   // Recursive N-D indexed assignment
-  template <class T>
+  template <typename T>
   void do_fill (const T& val, T *dest, int lev) const
   {
     if (lev == 0)
@@ -613,13 +613,13 @@
 
 public:
 
-  template <class T>
+  template <typename T>
   void index (const T *src, T *dest) const { do_index (src, dest, top); }
 
-  template <class T>
+  template <typename T>
   void assign (const T *src, T *dest) const { do_assign (src, dest, top); }
 
-  template <class T>
+  template <typename T>
   void fill (const T& val, T *dest) const { do_fill (val, dest, top); }
 
   bool is_cont_range (octave_idx_type& l,
@@ -670,7 +670,7 @@
 private:
 
   // recursive resizing
-  template <class T>
+  template <typename T>
   void do_resize_fill (const T* src, T *dest, const T& rfv, int lev) const
   {
     if (lev == 0)
@@ -698,12 +698,12 @@
 
 public:
 
-  template <class T>
+  template <typename T>
   void resize_fill (const T* src, T *dest, const T& rfv) const
   { do_resize_fill (src, dest, rfv, n-1); }
 };
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::index (const idx_vector& i) const
 {
@@ -767,7 +767,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::index (const idx_vector& i, const idx_vector& j) const
 {
@@ -825,7 +825,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::index (const Array<idx_vector>& ia) const
 {
@@ -889,7 +889,7 @@
 
 // The default fill value.  Override if you want a different one.
 
-template <class T>
+template <typename T>
 T
 Array<T>::resize_fill_value (void) const
 {
@@ -900,7 +900,7 @@
 // Yes, we could do resize using index & assign.  However, that would
 // possibly involve a lot more memory traffic than we actually need.
 
-template <class T>
+template <typename T>
 void
 Array<T>::resize1 (octave_idx_type n, const T& rfv)
 {
@@ -971,7 +971,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::resize2 (octave_idx_type r, octave_idx_type c, const T& rfv)
 {
@@ -1013,7 +1013,7 @@
     }
 }
 
-template<class T>
+template <typename T>
 void
 Array<T>::resize (const dim_vector& dv, const T& rfv)
 {
@@ -1035,7 +1035,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::index (const idx_vector& i, bool resize_ok, const T& rfv) const
 {
@@ -1059,7 +1059,7 @@
   return tmp.index (i);
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::index (const idx_vector& i, const idx_vector& j,
                  bool resize_ok, const T& rfv) const
@@ -1087,7 +1087,7 @@
   return tmp.index (i, j);
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::index (const Array<idx_vector>& ia,
                  bool resize_ok, const T& rfv) const
@@ -1119,7 +1119,7 @@
 }
 
 
-template <class T>
+template <typename T>
 void
 Array<T>::assign (const idx_vector& i, const Array<T>& rhs, const T& rfv)
 {
@@ -1166,7 +1166,7 @@
 }
 
 // Assignment to a 2-dimensional array
-template <class T>
+template <typename T>
 void
 Array<T>::assign (const idx_vector& i, const idx_vector& j,
                   const Array<T>& rhs, const T& rfv)
@@ -1270,7 +1270,7 @@
 }
 
 // Assignment to a multi-dimensional array
-template <class T>
+template <typename T>
 void
 Array<T>::assign (const Array<idx_vector>& ia,
                   const Array<T>& rhs, const T& rfv)
@@ -1393,7 +1393,7 @@
 %!error <op1 is 2x2, op2 is 2x1> a(1:2,2:3) = [1;2]
 */
 
-template <class T>
+template <typename T>
 void
 Array<T>::delete_elements (const idx_vector& i)
 {
@@ -1433,7 +1433,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::delete_elements (int dim, const idx_vector& i)
 {
@@ -1489,7 +1489,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::delete_elements (const Array<idx_vector>& ia)
 {
@@ -1566,7 +1566,7 @@
 
 }
 
-template <class T>
+template <typename T>
 Array<T>&
 Array<T>::insert (const Array<T>& a, octave_idx_type r, octave_idx_type c)
 {
@@ -1587,7 +1587,7 @@
   return *this;
 }
 
-template <class T>
+template <typename T>
 Array<T>&
 Array<T>::insert (const Array<T>& a, const Array<octave_idx_type>& ra_idx)
 {
@@ -1603,7 +1603,7 @@
 }
 
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::transpose (void) const
 {
@@ -1639,14 +1639,14 @@
     }
 }
 
-template <class T>
+template <typename T>
 static T
 no_op_fcn (const T& x)
 {
   return x;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::hermitian (T (*fcn) (const T&)) const
 {
@@ -1745,7 +1745,7 @@
 
 */
 
-template <class T>
+template <typename T>
 T *
 Array<T>::fortran_vec (void)
 {
@@ -1755,14 +1755,14 @@
 }
 
 // Non-real types don't have NaNs.
-template <class T>
+template <typename T>
 inline bool
 sort_isnan (typename ref_param<T>::type)
 {
   return false;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::sort (int dim, sortmode mode) const
 {
@@ -1878,7 +1878,7 @@
   return m;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::sort (Array<octave_idx_type> &sidx, int dim,
                 sortmode mode) const
@@ -2026,7 +2026,7 @@
   return m;
 }
 
-template <class T>
+template <typename T>
 typename Array<T>::compare_fcn_type
 safe_comparator (sortmode mode, const Array<T>& /* a */,
                  bool /* allow_chk */)
@@ -2039,7 +2039,7 @@
     return 0;
 }
 
-template <class T>
+template <typename T>
 sortmode
 Array<T>::is_sorted (sortmode mode) const
 {
@@ -2074,7 +2074,7 @@
 
 }
 
-template <class T>
+template <typename T>
 Array<octave_idx_type>
 Array<T>::sort_rows_idx (sortmode mode) const
 {
@@ -2093,7 +2093,7 @@
 }
 
 
-template <class T>
+template <typename T>
 sortmode
 Array<T>::is_sorted_rows (sortmode mode) const
 {
@@ -2154,7 +2154,7 @@
 }
 
 // Do a binary lookup in a sorted array.
-template <class T>
+template <typename T>
 octave_idx_type
 Array<T>::lookup (const T& value, sortmode mode) const
 {
@@ -2175,7 +2175,7 @@
   return lsort.lookup (data (), n, value);
 }
 
-template <class T>
+template <typename T>
 Array<octave_idx_type>
 Array<T>::lookup (const Array<T>& values, sortmode mode) const
 {
@@ -2219,7 +2219,7 @@
   return idx;
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 Array<T>::nnz (void) const
 {
@@ -2234,7 +2234,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Array<octave_idx_type>
 Array<T>::find (octave_idx_type n, bool backward) const
 {
@@ -2315,7 +2315,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::nth_element (const idx_vector& n, int dim) const
 {
@@ -2503,7 +2503,7 @@
 Array<T>::nth_element (const idx_vector&, int) const { return Array<T> (); }
 
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::diag (octave_idx_type k) const
 {
@@ -2589,7 +2589,7 @@
   return d;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::diag (octave_idx_type m, octave_idx_type n) const
 {
@@ -2604,7 +2604,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Array<T>::cat (int dim, octave_idx_type n, const Array<T> *array_list)
 {
@@ -2708,7 +2708,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 void
 Array<T>::print_info (std::ostream& os, const std::string& prefix) const
 {
@@ -2725,7 +2725,7 @@
   //     << prefix << "cols: " << cols () << "\n";
 }
 
-template <class T>
+template <typename T>
 bool Array<T>::optimize_dimensions (const dim_vector& dv)
 {
   bool retval = dimensions == dv;
@@ -2735,7 +2735,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 void Array<T>::instantiation_guard ()
 {
   // This guards against accidental implicit instantiations.
@@ -2749,7 +2749,7 @@
 
 // FIXME: is this used?
 
-template <class T>
+template <typename T>
 std::ostream&
 operator << (std::ostream& os, const Array<T>& a)
 {
--- a/liboctave/array/Array.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/Array.h	Sun Jan 24 13:50:04 2016 -0500
@@ -41,7 +41,7 @@
 #include "oct-refcount.h"
 
 //! Handles the reference counting for all the derived classes.
-template <class T>
+template <typename T>
 class
 Array
 {
@@ -62,7 +62,7 @@
       std::copy (d, d+l, data);
     }
 
-    template <class U>
+    template <typename U>
     ArrayRep (U *d, octave_idx_type l)
       : data (new T [l]), len (l), count (1)
     {
@@ -200,7 +200,7 @@
   Array (const Array<T>& a, const dim_vector& dv);
 
   //! Type conversion case.
-  template <class U>
+  template <typename U>
   Array (const Array<U>& a)
     : dimensions (a.dims ()),
       rep (new typename Array<T>::ArrayRep (a.data (), a.numel ())),
@@ -660,7 +660,7 @@
 
   //! Apply function fcn to each element of the Array<T>. This function
   //! is optimised with a manually unrolled loop.
-  template <class U, class F>
+  template <typename U, typename F>
   Array<U>
   map (F fcn) const
   {
@@ -692,19 +692,19 @@
 
   //@{
   //! Overloads for function references.
-  template <class U>
+  template <typename U>
   Array<U>
   map (U (&fcn) (T)) const
   { return map<U, U (&) (T)> (fcn); }
 
-  template <class U>
+  template <typename U>
   Array<U>
   map (U (&fcn) (const T&)) const
   { return map<U, U (&) (const T&)> (fcn); }
   //@}
 
   //! Generic any/all test functionality with arbitrary predicate.
-  template <class F, bool zero>
+  template <typename F, bool zero>
   bool test (F fcn) const
   {
     return any_all_test<F, T, zero> (fcn, data (), numel ());
@@ -712,11 +712,11 @@
 
   //@{
   //! Simpler calls.
-  template <class F>
+  template <typename F>
   bool test_any (F fcn) const
   { return test<F, false> (fcn); }
 
-  template <class F>
+  template <typename F>
   bool test_all (F fcn) const
   { return test<F, true> (fcn); }
   //@}
@@ -736,7 +736,7 @@
   { return test<bool (&) (const T&), true> (fcn); }
   //@}
 
-  template <class U> friend class Array;
+  template <typename U> friend class Array;
 
   //! Returns true if this->dims () == dv, and if so, replaces this->dimensions
   //! by a shallow copy of dv. This is useful for maintaining several arrays with
@@ -764,7 +764,7 @@
 //! non-const operator() to not check for the array's uniqueness. It
 //! is, however, the user's responsibility to ensure the array is
 //! actually unaliased whenever elements are accessed.
-template<class ArrayClass>
+template <typename ArrayClass>
 class NoAlias : public ArrayClass
 {
   typedef typename ArrayClass::element_type T;
@@ -772,13 +772,13 @@
   NoAlias () : ArrayClass () { }
 
   // FIXME: this would be simpler once C++0x is available
-  template <class X>
+  template <typename X>
     explicit NoAlias (X x) : ArrayClass (x) { }
 
-  template <class X, class Y>
+  template <typename X, typename Y>
     explicit NoAlias (X x, Y y) : ArrayClass (x, y) { }
 
-  template <class X, class Y, class Z>
+  template <typename X, typename Y, typename Z>
     explicit NoAlias (X x, Y y, Z z) : ArrayClass (x, y, z) { }
 
   T& operator () (octave_idx_type n)
@@ -791,7 +791,7 @@
   { return ArrayClass::xelem (ra_idx); }
 };
 
-template <class T>
+template <typename T>
 std::ostream&
 operator << (std::ostream& os, const Array<T>& a);
 
--- a/liboctave/array/CDiagMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/CDiagMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -65,7 +65,7 @@
   ComplexDiagMatrix (const ComplexDiagMatrix& a)
     : MDiagArray2<Complex> (a) { }
 
-  template <class U>
+  template <typename U>
   ComplexDiagMatrix (const DiagArray2<U>& a)
     : MDiagArray2<Complex> (a) { }
 
--- a/liboctave/array/CMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/CMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -59,10 +59,10 @@
 
   ComplexMatrix (const ComplexMatrix& a) : ComplexNDArray (a) { }
 
-  template <class U>
+  template <typename U>
   ComplexMatrix (const MArray<U>& a) : ComplexNDArray (a.as_matrix ()) { }
 
-  template <class U>
+  template <typename U>
   ComplexMatrix (const Array<U>& a) : ComplexNDArray (a.as_matrix ()) { }
 
   ComplexMatrix (const Matrix& re, const Matrix& im);
--- a/liboctave/array/CNDArray.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/CNDArray.h	Sun Jan 24 13:50:04 2016 -0500
@@ -44,10 +44,10 @@
 
   ComplexNDArray (const ComplexNDArray& a) : MArray<Complex> (a) { }
 
-  template <class U>
+  template <typename U>
   ComplexNDArray (const MArray<U>& a) : MArray<Complex> (a) { }
 
-  template <class U>
+  template <typename U>
   ComplexNDArray (const Array<U>& a) : MArray<Complex> (a) { }
 
   ComplexNDArray (const charNDArray&);
--- a/liboctave/array/DiagArray2.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/DiagArray2.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -36,7 +36,7 @@
 
 #include "lo-error.h"
 
-template <class T>
+template <typename T>
 DiagArray2<T>::DiagArray2 (const Array<T>& a, octave_idx_type r,
                            octave_idx_type c)
   : Array<T> (a.as_column ()), d1 (r), d2 (c)
@@ -46,14 +46,14 @@
     Array<T>::resize (dim_vector (rcmin, 1));
 }
 
-template <class T>
+template <typename T>
 Array<T>
 DiagArray2<T>::diag (octave_idx_type k) const
 {
   return extract_diag (k);
 }
 
-template <class T>
+template <typename T>
 Array<T>
 DiagArray2<T>::extract_diag (octave_idx_type k) const
 {
@@ -72,14 +72,14 @@
   return d;
 }
 
-template <class T>
+template <typename T>
 DiagArray2<T>
 DiagArray2<T>::transpose (void) const
 {
   return DiagArray2<T> (*this, d2, d1);
 }
 
-template <class T>
+template <typename T>
 DiagArray2<T>
 DiagArray2<T>::hermitian (T (* fcn) (const T&)) const
 {
@@ -88,7 +88,7 @@
 
 // A two-dimensional array with diagonal elements only.
 
-template <class T>
+template <typename T>
 void
 DiagArray2<T>::resize (octave_idx_type r, octave_idx_type c,
                        const T& rfv)
@@ -103,7 +103,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 Array<T>
 DiagArray2<T>::array_value (void) const
 {
--- a/liboctave/array/DiagArray2.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/DiagArray2.h	Sun Jan 24 13:50:04 2016 -0500
@@ -34,7 +34,7 @@
 // Array<T> is inherited privately so that some methods, like index, don't
 // produce unexpected results.
 
-template <class T>
+template <typename T>
 class
 DiagArray2 : protected Array<T>
 {
@@ -62,7 +62,7 @@
   DiagArray2 (const DiagArray2<T>& a)
     : Array<T> (a), d1 (a.d1), d2 (a.d2) { }
 
-  template <class U>
+  template <typename U>
   DiagArray2 (const DiagArray2<U>& a)
     : Array<T> (a.extract_diag ()), d1 (a.dim1 ()), d2 (a.dim2 ()) { }
 
--- a/liboctave/array/MArray.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MArray.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -29,7 +29,7 @@
 #include "Array-util.h"
 #include "lo-error.h"
 
-template <class T>
+template <typename T>
 struct _idxadds_helper
 {
   T *array;
@@ -39,7 +39,7 @@
   { array[i] += val; }
 };
 
-template <class T>
+template <typename T>
 struct _idxadda_helper
 {
   T *array;
@@ -49,7 +49,7 @@
   { array[i] += *vals++; }
 };
 
-template <class T>
+template <typename T>
 void
 MArray<T>::idx_add (const idx_vector& idx, T val)
 {
@@ -67,7 +67,7 @@
   idx.loop (len, _idxadds_helper<T> (this->fortran_vec (), val));
 }
 
-template <class T>
+template <typename T>
 void
 MArray<T>::idx_add (const idx_vector& idx, const MArray<T>& vals)
 {
@@ -85,7 +85,7 @@
   idx.loop (len, _idxadda_helper<T> (this->fortran_vec (), vals.data ()));
 }
 
-template <class T, T op (typename ref_param<T>::type,
+template <typename T, T op (typename ref_param<T>::type,
                          typename ref_param<T>::type)>
 struct _idxbinop_helper
 {
@@ -96,7 +96,7 @@
   { array[i] = op (array[i], *vals++); }
 };
 
-template <class T>
+template <typename T>
 void
 MArray<T>::idx_min (const idx_vector& idx, const MArray<T>& vals)
 {
@@ -115,7 +115,7 @@
                                             vals.data ()));
 }
 
-template <class T>
+template <typename T>
 void
 MArray<T>::idx_max (const idx_vector& idx, const MArray<T>& vals)
 {
@@ -136,7 +136,7 @@
 
 #include <iostream>
 
-template <class T>
+template <typename T>
 void MArray<T>::idx_add_nd (const idx_vector& idx, const MArray<T>& vals,
                             int dim)
 {
@@ -199,7 +199,7 @@
 }
 
 // N-dimensional array with math ops.
-template <class T>
+template <typename T>
 void
 MArray<T>::changesign (void)
 {
@@ -211,7 +211,7 @@
 
 // Element by element MArray by scalar ops.
 
-template <class T>
+template <typename T>
 MArray<T>&
 operator += (MArray<T>& a, const T& s)
 {
@@ -222,7 +222,7 @@
   return a;
 }
 
-template <class T>
+template <typename T>
 MArray<T>&
 operator -= (MArray<T>& a, const T& s)
 {
@@ -233,7 +233,7 @@
   return a;
 }
 
-template <class T>
+template <typename T>
 MArray<T>&
 operator *= (MArray<T>& a, const T& s)
 {
@@ -244,7 +244,7 @@
   return a;
 }
 
-template <class T>
+template <typename T>
 MArray<T>&
 operator /= (MArray<T>& a, const T& s)
 {
@@ -257,7 +257,7 @@
 
 // Element by element MArray by MArray ops.
 
-template <class T>
+template <typename T>
 MArray<T>&
 operator += (MArray<T>& a, const MArray<T>& b)
 {
@@ -268,7 +268,7 @@
   return a;
 }
 
-template <class T>
+template <typename T>
 MArray<T>&
 operator -= (MArray<T>& a, const MArray<T>& b)
 {
@@ -280,7 +280,7 @@
 }
 
 
-template <class T>
+template <typename T>
 MArray<T>&
 product_eq (MArray<T>& a, const MArray<T>& b)
 {
@@ -291,7 +291,7 @@
   return a;
 }
 
-template <class T>
+template <typename T>
 MArray<T>&
 quotient_eq (MArray<T>& a, const MArray<T>& b)
 {
@@ -305,7 +305,7 @@
 // Element by element MArray by scalar ops.
 
 #define MARRAY_NDS_OP(OP, FN) \
-  template <class T> \
+  template <typename T> \
   MArray<T> \
   operator OP (const MArray<T>& a, const T& s) \
   { \
@@ -320,7 +320,7 @@
 // Element by element scalar by MArray ops.
 
 #define MARRAY_SND_OP(OP, FN) \
-  template <class T> \
+  template <typename T> \
   MArray<T> \
   operator OP (const T& s, const MArray<T>& a) \
   { \
@@ -335,7 +335,7 @@
 // Element by element MArray by MArray ops.
 
 #define MARRAY_NDND_OP(FCN, OP, FN) \
-  template <class T> \
+  template <typename T> \
   MArray<T> \
   FCN (const MArray<T>& a, const MArray<T>& b) \
   { \
@@ -347,14 +347,14 @@
 MARRAY_NDND_OP (product,    *, mx_inline_mul)
 MARRAY_NDND_OP (quotient,   /, mx_inline_div)
 
-template <class T>
+template <typename T>
 MArray<T>
 operator + (const MArray<T>& a)
 {
   return a;
 }
 
-template <class T>
+template <typename T>
 MArray<T>
 operator - (const MArray<T>& a)
 {
--- a/liboctave/array/MArray.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MArray.h	Sun Jan 24 13:50:04 2016 -0500
@@ -27,7 +27,7 @@
 #include "Array.h"
 #include "mx-inlines.cc"
 
-template <class T> class MArray;
+template <typename T> class MArray;
 
 template <typename T> MArray<T>& operator += (MArray<T>&, const T&);
 template <typename T> MArray<T>& operator -= (MArray<T>&, const T&);
@@ -53,7 +53,7 @@
 template <typename T> MArray<T> product (const MArray<T>&, const MArray<T>&);
 
 //! Template for N-dimensional array classes with like-type math operators.
-template <class T>
+template <typename T>
 class
 MArray : public Array<T>
 {
@@ -75,7 +75,7 @@
 
   MArray (const MArray<T>& a) : Array<T> (a) { }
 
-  template <class U>
+  template <typename U>
   MArray (const Array<U>& a) : Array<T> (a) { }
 
   ~MArray (void) { }
--- a/liboctave/array/MDiagArray2.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MDiagArray2.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -29,7 +29,7 @@
 #include "Array-util.h"
 #include "lo-error.h"
 
-template <class T>
+template <typename T>
 bool
 MDiagArray2<T>::is_multiple_of_identity (T val) const
 {
@@ -53,7 +53,7 @@
 // Element by element MDiagArray2 by scalar ops.
 
 #define MARRAY_DAS_OP(OP, FN) \
-  template <class T> \
+  template <typename T> \
   MDiagArray2<T> \
   operator OP (const MDiagArray2<T>& a, const T& s) \
   { \
@@ -65,7 +65,7 @@
 
 // Element by element scalar by MDiagArray2 ops.
 
-template <class T>
+template <typename T>
 MDiagArray2<T>
 operator * (const T& s, const MDiagArray2<T>& a)
 {
@@ -76,7 +76,7 @@
 // Element by element MDiagArray2 by MDiagArray2 ops.
 
 #define MARRAY_DADA_OP(FCN, OP, FN) \
-  template <class T> \
+  template <typename T> \
   MDiagArray2<T> \
   FCN (const MDiagArray2<T>& a, const MDiagArray2<T>& b) \
   { \
@@ -92,14 +92,14 @@
 
 // Unary MDiagArray2 ops.
 
-template <class T>
+template <typename T>
 MDiagArray2<T>
 operator + (const MDiagArray2<T>& a)
 {
   return a;
 }
 
-template <class T>
+template <typename T>
 MDiagArray2<T>
 operator - (const MDiagArray2<T>& a)
 {
--- a/liboctave/array/MDiagArray2.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MDiagArray2.h	Sun Jan 24 13:50:04 2016 -0500
@@ -28,7 +28,7 @@
 #include "DiagArray2.h"
 #include "MArray.h"
 
-template <class T> class MDiagArray2;
+template <typename T> class MDiagArray2;
 
 template <typename T> MDiagArray2<T> operator + (const MDiagArray2<T>&);
 template <typename T> MDiagArray2<T> operator - (const MDiagArray2<T>&);
@@ -46,7 +46,7 @@
                                               const MDiagArray2<T>&);
 
 //! Template for two dimensional diagonal array with math operators.
-template <class T>
+template <typename T>
 class
 MDiagArray2 : public DiagArray2<T>
 {
@@ -63,7 +63,7 @@
 
   MDiagArray2 (const DiagArray2<T>& a) : DiagArray2<T> (a) { }
 
-  template <class U>
+  template <typename U>
   MDiagArray2 (const DiagArray2<U>& a) : DiagArray2<T> (a) { }
 
   explicit MDiagArray2 (const Array<T>& a) : DiagArray2<T> (a) { }
--- a/liboctave/array/MSparse.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MSparse.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -25,7 +25,7 @@
 
 // Element by element MSparse by MSparse ops.
 
-template <class T, class OP>
+template <typename T, typename OP>
 MSparse<T>&
 plus_or_minus (MSparse<T>& a, const MSparse<T>& b, OP op, const char* op_name)
 {
@@ -112,7 +112,7 @@
 
 // Element by element MSparse by scalar ops.
 
-template <class T, class OP>
+template <typename T, typename OP>
 MArray<T>
 plus_or_minus (const MSparse<T>& a, const T& s, OP op)
 {
@@ -142,7 +142,7 @@
 }
 
 
-template <class T, class OP>
+template <typename T, typename OP>
 MSparse<T>
 times_or_divide (const MSparse<T>& a, const T& s, OP op)
 {
@@ -180,7 +180,7 @@
 
 // Element by element scalar by MSparse ops.
 
-template <class T, class OP>
+template <typename T, typename OP>
 MArray<T>
 plus_or_minus (const T& s, const MSparse<T>& a, OP op)
 {
@@ -209,7 +209,7 @@
   return plus_or_minus (s, a, std::minus<T> ());
 }
 
-template <class T, class OP>
+template <typename T, typename OP>
 MSparse<T>
 times_or_divides (const T& s, const MSparse<T>& a, OP op)
 {
@@ -230,14 +230,14 @@
   return r;
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 operator * (const T& s, const MSparse<T>& a)
 {
   return times_or_divides (s, a, std::multiplies<T> ());
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 operator / (const T& s, const MSparse<T>& a)
 {
@@ -247,7 +247,7 @@
 
 // Element by element MSparse by MSparse ops.
 
-template <class T, class OP>
+template <typename T, typename OP>
 MSparse<T>
 plus_or_minus (const MSparse<T>& a, const MSparse<T>& b, OP op,
                const char* op_name, bool negate)
@@ -366,21 +366,21 @@
   return r;
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 operator+ (const MSparse<T>& a, const MSparse<T>& b)
 {
   return plus_or_minus (a, b, std::plus<T> (), "operator +", false);
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 operator- (const MSparse<T>& a, const MSparse<T>& b)
 {
   return plus_or_minus (a, b, std::minus<T> (), "operator -", true);
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 product (const MSparse<T>& a, const MSparse<T>& b)
 {
@@ -477,7 +477,7 @@
   return r;
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 quotient (const MSparse<T>& a, const MSparse<T>& b)
 {
@@ -595,14 +595,14 @@
 
 // Unary MSparse ops.
 
-template <class T>
+template <typename T>
 MSparse<T>
 operator + (const MSparse<T>& a)
 {
   return a;
 }
 
-template <class T>
+template <typename T>
 MSparse<T>
 operator - (const MSparse<T>& a)
 {
--- a/liboctave/array/MSparse.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MSparse.h	Sun Jan 24 13:50:04 2016 -0500
@@ -38,7 +38,7 @@
 
 
 // Two dimensional sparse array with math ops.
-template <class T>
+template <typename T>
 class
 MSparse : public Sparse<T>
 {
@@ -57,7 +57,7 @@
 
   MSparse (const Sparse<T>& a) : Sparse<T> (a) { }
 
-  template <class U>
+  template <typename U>
   MSparse (const Sparse<U>& a) : Sparse<T> (a) { }
 
   MSparse (const Array<T>& a, const idx_vector& r, const idx_vector& c,
@@ -112,12 +112,12 @@
   }
 
   // FIXME: should go away.
-  template <class U>
+  template <typename U>
   MSparse<U>
   map (U (&fcn) (T)) const
   { return Sparse<T>::template map<U> (fcn); }
 
-  template <class U>
+  template <typename U>
   MSparse<U>
   map (U (&fcn) (const T&)) const
   { return Sparse<T>::template map<U> (fcn); }
--- a/liboctave/array/MatrixType.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/MatrixType.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -80,7 +80,7 @@
     }
 }
 
-template<class T>
+template <typename T>
 MatrixType::matrix_type
 matrix_real_probe (const MArray<T>& a)
 {
@@ -138,7 +138,7 @@
   return typ;
 }
 
-template<class T>
+template <typename T>
 MatrixType::matrix_type
 matrix_complex_probe (const MArray<std::complex<T> >& a)
 {
--- a/liboctave/array/Sparse.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/Sparse.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -52,7 +52,7 @@
 
 #include "PermMatrix.h"
 
-template <class T>
+template <typename T>
 Sparse<T>::Sparse (const PermMatrix& a)
   : rep (new typename Sparse<T>::SparseRep (a.rows (), a.cols (), a.rows ())),
     dimensions (dim_vector (a.rows (), a.cols ()))
@@ -70,7 +70,7 @@
     data (i) = 1.0;
 }
 
-template <class T>
+template <typename T>
 T&
 Sparse<T>::SparseRep::elem (octave_idx_type _r, octave_idx_type _c)
 {
@@ -111,7 +111,7 @@
   return d[i];
 }
 
-template <class T>
+template <typename T>
 T
 Sparse<T>::SparseRep::celem (octave_idx_type _r, octave_idx_type _c) const
 {
@@ -122,7 +122,7 @@
   return T ();
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::SparseRep::maybe_compress (bool remove_zeros)
 {
@@ -146,7 +146,7 @@
   change_length (c[ncols]);
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::SparseRep::change_length (octave_idx_type nz)
 {
@@ -177,14 +177,14 @@
     }
 }
 
-template <class T>
+template <typename T>
 bool
 Sparse<T>::SparseRep::indices_ok (void) const
 {
   return sparse_indices_ok (r, c, nrows, ncols, nnz ());
 }
 
-template <class T>
+template <typename T>
 Sparse<T>::Sparse (octave_idx_type nr, octave_idx_type nc, T val)
   : rep (0), dimensions (dim_vector (nr, nc))
 {
@@ -212,7 +212,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 Sparse<T>::Sparse (const dim_vector& dv)
   : rep (0), dimensions (dv)
 {
@@ -223,7 +223,7 @@
   rep = new typename Sparse<T>::SparseRep (dv(0), dv(1), 0);
 }
 
-template <class T>
+template <typename T>
 Sparse<T>::Sparse (const Sparse<T>& a, const dim_vector& dv)
   : rep (0), dimensions (dv)
 {
@@ -265,7 +265,7 @@
     xcidx (k+1) = new_nzmx;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>::Sparse (const Array<T>& a, const idx_vector& r,
                    const idx_vector& c, octave_idx_type nr,
                    octave_idx_type nc, bool sum_terms,
@@ -625,7 +625,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 Sparse<T>::Sparse (const Array<T>& a)
   : rep (0), dimensions (a.dims ())
 {
@@ -659,14 +659,14 @@
     }
 }
 
-template <class T>
+template <typename T>
 Sparse<T>::~Sparse (void)
 {
   if (--rep->count == 0)
     delete rep;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>&
 Sparse<T>::operator = (const Sparse<T>& a)
 {
@@ -684,7 +684,7 @@
   return *this;
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 Sparse<T>::compute_index (const Array<octave_idx_type>& ra_idx) const
 {
@@ -707,21 +707,21 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 T
 Sparse<T>::range_error (const char *fcn, octave_idx_type n) const
 {
   (*current_liboctave_error_handler) ("%s (%d): range error", fcn, n);
 }
 
-template <class T>
+template <typename T>
 T&
 Sparse<T>::range_error (const char *fcn, octave_idx_type n)
 {
   (*current_liboctave_error_handler) ("%s (%d): range error", fcn, n);
 }
 
-template <class T>
+template <typename T>
 T
 Sparse<T>::range_error (const char *fcn, octave_idx_type i,
                         octave_idx_type j) const
@@ -729,14 +729,14 @@
   (*current_liboctave_error_handler) ("%s (%d, %d): range error", fcn, i, j);
 }
 
-template <class T>
+template <typename T>
 T&
 Sparse<T>::range_error (const char *fcn, octave_idx_type i, octave_idx_type j)
 {
   (*current_liboctave_error_handler) ("%s (%d, %d): range error", fcn, i, j);
 }
 
-template <class T>
+template <typename T>
 T
 Sparse<T>::range_error (const char *fcn,
                         const Array<octave_idx_type>& ra_idx) const
@@ -760,7 +760,7 @@
   (*current_liboctave_error_handler) (buf_str.c_str ());
 }
 
-template <class T>
+template <typename T>
 T&
 Sparse<T>::range_error (const char *fcn, const Array<octave_idx_type>& ra_idx)
 {
@@ -783,7 +783,7 @@
   (*current_liboctave_error_handler) (buf_str.c_str ());
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::reshape (const dim_vector& new_dims) const
 {
@@ -850,7 +850,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::permute (const Array<octave_idx_type>& perm_vec, bool) const
 {
@@ -878,7 +878,7 @@
   return trans ? this->transpose () : *this;
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::resize1 (octave_idx_type n)
 {
@@ -897,7 +897,7 @@
     err_invalid_resize ();
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::resize (const dim_vector& dv)
 {
@@ -909,7 +909,7 @@
   resize (dv(0), dv(1));
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::resize (octave_idx_type r, octave_idx_type c)
 {
@@ -959,7 +959,7 @@
   rep->change_length (rep->nnz ());
 }
 
-template <class T>
+template <typename T>
 Sparse<T>&
 Sparse<T>::insert (const Sparse<T>& a, octave_idx_type r, octave_idx_type c)
 {
@@ -1040,7 +1040,7 @@
   return *this;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>&
 Sparse<T>::insert (const Sparse<T>& a, const Array<octave_idx_type>& ra_idx)
 {
@@ -1051,7 +1051,7 @@
   return insert (a, ra_idx(0), ra_idx(1));
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::transpose (void) const
 {
@@ -1107,7 +1107,7 @@
     return std::lower_bound (ridx, ridx + nr, ri) - ridx;
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::delete_elements (const idx_vector& idx)
 {
@@ -1208,7 +1208,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::delete_elements (const idx_vector& idx_i, const idx_vector& idx_j)
 {
@@ -1327,7 +1327,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::delete_elements (int dim, const idx_vector& idx)
 {
@@ -1339,7 +1339,7 @@
     (*current_liboctave_error_handler) ("invalid dimension in delete_elements");
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::index (const idx_vector& idx, bool resize_ok) const
 {
@@ -1540,7 +1540,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::index (const idx_vector& idx_i, const idx_vector& idx_j,
                   bool resize_ok) const
@@ -1784,7 +1784,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::assign (const idx_vector& idx, const Sparse<T>& rhs)
 {
@@ -1936,7 +1936,7 @@
     err_nonconformant ("=", dim_vector(idx.length (n),1), rhs.dims());
 }
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::assign (const idx_vector& idx_i,
                    const idx_vector& idx_j, const Sparse<T>& rhs)
@@ -2178,7 +2178,7 @@
 
 // Can't use versions of these in Array.cc due to duplication of the
 // instantiations for Array<double and Sparse<double>, etc
-template <class T>
+template <typename T>
 bool
 sparse_ascending_compare (typename ref_param<T>::type a,
                           typename ref_param<T>::type b)
@@ -2186,7 +2186,7 @@
   return (a < b);
 }
 
-template <class T>
+template <typename T>
 bool
 sparse_descending_compare (typename ref_param<T>::type a,
                            typename ref_param<T>::type b)
@@ -2194,7 +2194,7 @@
   return (a > b);
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::sort (octave_idx_type dim, sortmode mode) const
 {
@@ -2259,7 +2259,7 @@
   return m;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::sort (Array<octave_idx_type> &sidx, octave_idx_type dim,
                  sortmode mode) const
@@ -2365,7 +2365,7 @@
   return m;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::diag (octave_idx_type k) const
 {
@@ -2538,7 +2538,7 @@
   return d;
 }
 
-template <class T>
+template <typename T>
 Sparse<T>
 Sparse<T>::cat (int dim, octave_idx_type n, const Sparse<T> *sparse_list)
 {
@@ -2636,7 +2636,7 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 Array<T>
 Sparse<T>::array_value () const
 {
@@ -2862,7 +2862,7 @@
 
 */
 
-template <class T>
+template <typename T>
 void
 Sparse<T>::print_info (std::ostream& os, const std::string& prefix) const
 {
--- a/liboctave/array/Sparse.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/Sparse.h	Sun Jan 24 13:50:04 2016 -0500
@@ -45,7 +45,7 @@
 // Two dimensional sparse class.  Handles the reference counting for
 // all the derived classes.
 
-template <class T>
+template <typename T>
 class
 Sparse
 {
@@ -204,7 +204,7 @@
   explicit Sparse (const PermMatrix& a);
 
   // Type conversion case. Preserves capacity ().
-  template <class U>
+  template <typename U>
   Sparse (const Sparse<U>& a)
     : rep (new typename Sparse<T>::SparseRep (a.rep->nrows, a.rep->ncols,
            a.rep->nzmx)),
@@ -599,18 +599,18 @@
   Array<T> array_value (void) const;
 
   // Generic any/all test functionality with arbitrary predicate.
-  template <class F, bool zero>
+  template <typename F, bool zero>
   bool test (F fcn) const
   {
     return any_all_test<F, T, zero> (fcn, data (), nnz ());
   }
 
   // Simpler calls.
-  template <class F>
+  template <typename F>
   bool test_any (F fcn) const
   { return test<F, false> (fcn); }
 
-  template <class F>
+  template <typename F>
   bool test_all (F fcn) const
   { return test<F, true> (fcn); }
 
@@ -627,7 +627,7 @@
   bool test_all (bool (&fcn) (const T&)) const
   { return test<bool (&) (const T&), true> (fcn); }
 
-  template <class U, class F>
+  template <typename U, typename F>
   Sparse<U>
   map (F fcn) const
   {
@@ -683,12 +683,12 @@
   }
 
   // Overloads for function references.
-  template <class U>
+  template <typename U>
   Sparse<U>
   map (U (&fcn) (T)) const
   { return map<U, U (&) (T)> (fcn); }
 
-  template <class U>
+  template <typename U>
   Sparse<U>
   map (U (&fcn) (const T&)) const
   { return map<U, U (&) (const T&)> (fcn); }
@@ -696,7 +696,7 @@
   bool indices_ok (void) const { return rep->indices_ok (); }
 };
 
-template<typename T>
+template <typename T>
 std::istream&
 read_sparse_matrix (std::istream& is, Sparse<T>& a,
                     T (*read_fcn) (std::istream&))
--- a/liboctave/array/dDiagMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/dDiagMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -52,7 +52,7 @@
 
   DiagMatrix (const MDiagArray2<double>& a) : MDiagArray2<double> (a) { }
 
-  template <class U>
+  template <typename U>
   DiagMatrix (const DiagArray2<U>& a) : MDiagArray2<double> (a) { }
 
   explicit DiagMatrix (const Array<double>& a) : MDiagArray2<double> (a) { }
--- a/liboctave/array/dMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/dMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -58,10 +58,10 @@
 
   Matrix (const Matrix& a) : NDArray (a) { }
 
-  template <class U>
+  template <typename U>
   Matrix (const MArray<U>& a) : NDArray (a.as_matrix ()) { }
 
-  template <class U>
+  template <typename U>
   Matrix (const Array<U>& a) : NDArray (a.as_matrix ()) { }
 
   explicit Matrix (const RowVector& rv);
@@ -383,7 +383,7 @@
 
 MARRAY_FORWARD_DEFS (MArray, Matrix, double)
 
-template <class T>
+template <typename T>
 void read_int (std::istream& is, bool swap_bytes, T& val);
 
 #endif
--- a/liboctave/array/dNDArray.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/dNDArray.h	Sun Jan 24 13:50:04 2016 -0500
@@ -48,13 +48,13 @@
   NDArray (const Array<octave_idx_type>& a, bool zero_based = false,
            bool negative_to_nan = false);
 
-  template <class U>
+  template <typename U>
   NDArray (const MArray<U>& a) : MArray<double> (a) { }
 
-  template <class U>
+  template <typename U>
   NDArray (const Array<U>& a) : MArray<double> (a) { }
 
-  template <class U>
+  template <typename U>
   explicit NDArray (const intNDArray<U>& a) : MArray<double> (a) { }
 
   NDArray (const charNDArray&);
--- a/liboctave/array/fCDiagMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/fCDiagMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -67,7 +67,7 @@
   FloatComplexDiagMatrix (const FloatComplexDiagMatrix& a)
     : MDiagArray2<FloatComplex> (a) { }
 
-  template <class U>
+  template <typename U>
   FloatComplexDiagMatrix (const DiagArray2<U>& a)
     : MDiagArray2<FloatComplex> (a) { }
 
--- a/liboctave/array/fCMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/fCMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -62,11 +62,11 @@
   FloatComplexMatrix (const FloatComplexMatrix& a)
     : FloatComplexNDArray (a) { }
 
-  template <class U>
+  template <typename U>
   FloatComplexMatrix (const MArray<U>& a)
     : FloatComplexNDArray (a.as_matrix ()) { }
 
-  template <class U>
+  template <typename U>
   FloatComplexMatrix (const Array<U>& a)
     : FloatComplexNDArray (a.as_matrix ()) { }
 
--- a/liboctave/array/fCNDArray.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/fCNDArray.h	Sun Jan 24 13:50:04 2016 -0500
@@ -45,10 +45,10 @@
   FloatComplexNDArray (const FloatComplexNDArray& a)
     : MArray<FloatComplex> (a) { }
 
-  template <class U>
+  template <typename U>
   FloatComplexNDArray (const MArray<U>& a) : MArray<FloatComplex> (a) { }
 
-  template <class U>
+  template <typename U>
   FloatComplexNDArray (const Array<U>& a) : MArray<FloatComplex> (a) { }
 
   FloatComplexNDArray (const charNDArray&);
--- a/liboctave/array/fDiagMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/fDiagMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -52,7 +52,7 @@
 
   FloatDiagMatrix (const MDiagArray2<float>& a) : MDiagArray2<float> (a) { }
 
-  template <class U>
+  template <typename U>
   FloatDiagMatrix (const DiagArray2<U>& a) : MDiagArray2<float> (a) { }
 
   explicit FloatDiagMatrix (const Array<double>& a) : MDiagArray2<float> (a) { }
--- a/liboctave/array/fMatrix.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/fMatrix.h	Sun Jan 24 13:50:04 2016 -0500
@@ -58,10 +58,10 @@
 
   FloatMatrix (const FloatMatrix& a) : FloatNDArray (a) { }
 
-  template <class U>
+  template <typename U>
   FloatMatrix (const MArray<U>& a) : FloatNDArray (a.as_matrix ()) { }
 
-  template <class U>
+  template <typename U>
   FloatMatrix (const Array<U>& a) : FloatNDArray (a.as_matrix ()) { }
 
   explicit FloatMatrix (const FloatRowVector& rv);
@@ -400,7 +400,7 @@
 
 MARRAY_FORWARD_DEFS (MArray, FloatMatrix, float)
 
-template <class T>
+template <typename T>
 void read_int (std::istream& is, bool swap_bytes, T& val);
 
 #endif
--- a/liboctave/array/fNDArray.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/fNDArray.h	Sun Jan 24 13:50:04 2016 -0500
@@ -45,13 +45,13 @@
 
   FloatNDArray (const FloatNDArray& a) : MArray<float> (a) { }
 
-  template <class U>
+  template <typename U>
   FloatNDArray (const MArray<U>& a) : MArray<float> (a) { }
 
-  template <class U>
+  template <typename U>
   FloatNDArray (const Array<U>& a) : MArray<float> (a) { }
 
-  template <class U>
+  template <typename U>
   explicit FloatNDArray (const intNDArray<U>& a) : MArray<float> (a) { }
 
   FloatNDArray (const charNDArray&);
--- a/liboctave/array/idx-vector.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/idx-vector.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -231,7 +231,7 @@
   return convert_index (static_cast<double> (x), conv_error, ext);
 }
 
-template <class T>
+template <typename T>
 inline octave_idx_type
 convert_index (octave_int<T> x, bool& conv_error,
                octave_idx_type& ext)
@@ -242,7 +242,7 @@
 }
 
 
-template <class T>
+template <typename T>
 idx_vector::idx_scalar_rep::idx_scalar_rep (T x)
   : data (0)
 {
@@ -294,7 +294,7 @@
 }
 
 
-template <class T>
+template <typename T>
 idx_vector::idx_vector_rep::idx_vector_rep (const Array<T>& nda)
   : data (0), len (nda.numel ()), ext (0), aowner (0), orig_dims (nda.dims ())
 {
--- a/liboctave/array/idx-vector.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/idx-vector.h	Sun Jan 24 13:50:04 2016 -0500
@@ -36,8 +36,8 @@
 #include "oct-inttypes.h"
 #include "oct-refcount.h"
 
-template<class T> class Array;
-template<class T> class Sparse;
+template <typename T> class Array;
+template <typename T> class Sparse;
 class Range;
 
 // Design rationale:
@@ -63,7 +63,7 @@
     class_mask
   };
 
-  template<class T> friend class std::auto_ptr;
+  template <typename T> friend class std::auto_ptr;
 
 private:
 
@@ -228,7 +228,7 @@
     // Zero-based constructor.
     idx_scalar_rep (octave_idx_type i);
 
-    template <class T>
+    template <typename T>
     idx_scalar_rep (T x);
 
     octave_idx_type xelem (octave_idx_type) const { return data; }
@@ -290,7 +290,7 @@
     idx_vector_rep (const Array<octave_idx_type>& inda,
                     octave_idx_type _ext, direct);
 
-    template <class T>
+    template <typename T>
     idx_vector_rep (const Array<T>&);
 
     idx_vector_rep (bool);
@@ -496,7 +496,7 @@
 
   // Conversion constructors (used by interpreter).
 
-  template <class T>
+  template <typename T>
   idx_vector (octave_int<T> x) : rep (new idx_scalar_rep (x)) { chkerr (); }
 
   idx_vector (double x) : rep (new idx_scalar_rep (x)) { chkerr (); }
@@ -506,7 +506,7 @@
   // A scalar bool does not necessarily map to scalar index.
   idx_vector (bool x) : rep (new idx_mask_rep (x)) { chkerr (); }
 
-  template <class T>
+  template <typename T>
   idx_vector (const Array<octave_int<T> >& nda) : rep (new idx_vector_rep (nda))
   { chkerr (); }
 
@@ -616,7 +616,7 @@
   //   dest[i] = src[idx(i)];
   // return i;
   //
-  template <class T>
+  template <typename T>
   octave_idx_type
   index (const T *src, octave_idx_type n, T *dest) const
   {
@@ -690,7 +690,7 @@
   //   dest[idx(i)] = src[i];
   // return i;
   //
-  template <class T>
+  template <typename T>
   octave_idx_type
   assign (const T *src, octave_idx_type n, T *dest) const
   {
@@ -762,7 +762,7 @@
   //   dest[idx(i)] = val;
   // return i;
   //
-  template <class T>
+  template <typename T>
   octave_idx_type
   fill (const T& val, octave_idx_type n, T *dest) const
   {
@@ -832,7 +832,7 @@
   //
   // for (octave_idx_type i = 0; i < idx->length (n); i++) body (idx(i));
 
-  template <class Functor>
+  template <typename Functor>
   void
   loop (octave_idx_type n, Functor body) const
   {
@@ -900,7 +900,7 @@
   // return i;
   //
 
-  template <class Functor>
+  template <typename Functor>
   octave_idx_type
   bloop (octave_idx_type n, Functor body) const
   {
--- a/liboctave/array/intNDArray.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/intNDArray.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -33,7 +33,7 @@
 
 // unary operations
 
-template <class T>
+template <typename T>
 boolNDArray
 intNDArray<T>::operator ! (void) const
 {
@@ -45,7 +45,7 @@
   return b;
 }
 
-template <class T>
+template <typename T>
 bool
 intNDArray<T>::any_element_not_one_or_zero (void) const
 {
@@ -62,14 +62,14 @@
   return false;
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::diag (octave_idx_type k) const
 {
   return MArray<T>::diag (k);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::diag (octave_idx_type m, octave_idx_type n) const
 {
@@ -78,21 +78,21 @@
 
 // FIXME: this is not quite the right thing.
 
-template <class T>
+template <typename T>
 boolNDArray
 intNDArray<T>::all (int dim) const
 {
   return do_mx_red_op<bool, T > (*this, dim, mx_inline_all);
 }
 
-template <class T>
+template <typename T>
 boolNDArray
 intNDArray<T>::any (int dim) const
 {
   return do_mx_red_op<bool, T > (*this, dim, mx_inline_any);
 }
 
-template <class T>
+template <typename T>
 void
 intNDArray<T>::increment_index (Array<octave_idx_type>& ra_idx,
                                 const dim_vector& dimensions,
@@ -101,7 +101,7 @@
   ::increment_index (ra_idx, dimensions, start_dimension);
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 intNDArray<T>::compute_index (Array<octave_idx_type>& ra_idx,
                               const dim_vector& dimensions)
@@ -109,7 +109,7 @@
   return ::compute_index (ra_idx, dimensions);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::concat (const intNDArray<T>& rb,
                        const Array<octave_idx_type>& ra_idx)
@@ -119,7 +119,7 @@
   return *this;
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>&
 intNDArray<T>::insert (const intNDArray<T>& a, octave_idx_type r,
                        octave_idx_type c)
@@ -128,7 +128,7 @@
   return *this;
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>&
 intNDArray<T>::insert (const intNDArray<T>& a,
                        const Array<octave_idx_type>& ra_idx)
@@ -139,7 +139,7 @@
 
 // This contains no information on the array structure !!!
 
-template <class T>
+template <typename T>
 std::ostream&
 operator << (std::ostream& os, const intNDArray<T>& a)
 {
@@ -151,7 +151,7 @@
   return os;
 }
 
-template <class T>
+template <typename T>
 std::istream&
 operator >> (std::istream& is, intNDArray<T>& a)
 {
@@ -179,7 +179,7 @@
 
 // FIXME: should abs and signum just be mapper functions?
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::abs (void) const
 {
@@ -195,7 +195,7 @@
   return ret;
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::signum (void) const
 {
@@ -211,91 +211,91 @@
   return ret;
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::prod (int dim) const
 {
   return do_mx_red_op<T, T> (*this, dim, mx_inline_prod);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::sum (int dim) const
 {
   return do_mx_red_op<T, T> (*this, dim, mx_inline_sum);
 }
 
-template <class T>
+template <typename T>
 NDArray
 intNDArray<T>::dsum (int dim) const
 {
   return do_mx_red_op<double, T> (*this, dim, mx_inline_dsum);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::cumsum (int dim) const
 {
   return do_mx_cum_op<T, T> (*this, dim, mx_inline_cumsum);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::max (int dim) const
 {
   return do_mx_minmax_op<T> (*this, dim, mx_inline_max);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::max (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<T> (*this, idx_arg, dim, mx_inline_max);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::min (int dim) const
 {
   return do_mx_minmax_op<T> (*this, dim, mx_inline_min);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::min (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_minmax_op<T> (*this, idx_arg, dim, mx_inline_min);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::cummax (int dim) const
 {
   return do_mx_cumminmax_op<T> (*this, dim, mx_inline_cummax);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::cummax (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<T> (*this, idx_arg, dim, mx_inline_cummax);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::cummin (int dim) const
 {
   return do_mx_cumminmax_op<T> (*this, dim, mx_inline_cummin);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::cummin (Array<octave_idx_type>& idx_arg, int dim) const
 {
   return do_mx_cumminmax_op<T> (*this, idx_arg, dim, mx_inline_cummin);
 }
 
-template <class T>
+template <typename T>
 intNDArray<T>
 intNDArray<T>::diff (octave_idx_type order, int dim) const
 {
--- a/liboctave/array/intNDArray.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/array/intNDArray.h	Sun Jan 24 13:50:04 2016 -0500
@@ -27,7 +27,7 @@
 #include "boolNDArray.h"
 class NDArray;
 
-template <class T>
+template <typename T>
 class
 intNDArray : public MArray<T>
 {
@@ -44,13 +44,13 @@
   intNDArray (const dim_vector& dv, T val)
     : MArray<T> (dv, val) { }
 
-  template <class U>
+  template <typename U>
   intNDArray (const Array<U>& a) : MArray<T> (a) { }
 
-  template <class U>
+  template <typename U>
   intNDArray (const MArray<U>& a) : MArray<T> (a) { }
 
-  template <class U>
+  template <typename U>
   intNDArray (const intNDArray<U>& a) : MArray<T> (a) { }
 
   intNDArray& operator = (const intNDArray<T>& a)
@@ -123,10 +123,10 @@
 
 // i/o
 
-template <class T>
+template <typename T>
 std::ostream& operator << (std::ostream& os, const intNDArray<T>& a);
 
-template <class T>
+template <typename T>
 std::istream& operator >> (std::istream& is, intNDArray<T>& a);
 
 #endif
--- a/liboctave/numeric/DET.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/DET.h	Sun Jan 24 13:50:04 2016 -0500
@@ -27,7 +27,7 @@
 #include "oct-cmplx.h"
 #include "lo-mappers.h"
 
-template <class T>
+template <typename T>
 class
 base_det
 {
--- a/liboctave/numeric/base-aepbal.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/base-aepbal.h	Sun Jan 24 13:50:04 2016 -0500
@@ -23,7 +23,7 @@
 #if ! defined (octave_base_aepbal_h)
 #define octave_base_aepbal_h 1
 
-template <class MatrixT, class VectorT>
+template <typename MatrixT, typename VectorT>
 class base_aepbal
 {
 protected:
--- a/liboctave/numeric/base-lu.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/base-lu.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -27,7 +27,7 @@
 
 #include "base-lu.h"
 
-template <class lu_type>
+template <typename lu_type>
 base_lu<lu_type>::base_lu (const lu_type& l, const lu_type& u,
                            const PermMatrix& p)
   : a_fact (u), l_fact (l), ipvt (p.transpose ().col_perm_vec ())
@@ -36,14 +36,14 @@
     (*current_liboctave_error_handler) ("lu: dimension mismatch");
 }
 
-template <class lu_type>
+template <typename lu_type>
 bool
 base_lu <lu_type> :: packed (void) const
 {
   return l_fact.dims () == dim_vector ();
 }
 
-template <class lu_type>
+template <typename lu_type>
 void
 base_lu <lu_type> :: unpack (void)
 {
@@ -55,7 +55,7 @@
     }
 }
 
-template <class lu_type>
+template <typename lu_type>
 lu_type
 base_lu <lu_type> :: L (void) const
 {
@@ -82,7 +82,7 @@
     return l_fact;
 }
 
-template <class lu_type>
+template <typename lu_type>
 lu_type
 base_lu <lu_type> :: U (void) const
 {
@@ -106,7 +106,7 @@
     return a_fact;
 }
 
-template <class lu_type>
+template <typename lu_type>
 lu_type
 base_lu <lu_type> :: Y (void) const
 {
@@ -117,7 +117,7 @@
   return a_fact;
 }
 
-template <class lu_type>
+template <typename lu_type>
 Array<octave_idx_type>
 base_lu <lu_type> :: getp (void) const
 {
@@ -148,14 +148,14 @@
     return ipvt;
 }
 
-template <class lu_type>
+template <typename lu_type>
 PermMatrix
 base_lu <lu_type> :: P (void) const
 {
   return PermMatrix (getp (), false);
 }
 
-template <class lu_type>
+template <typename lu_type>
 ColumnVector
 base_lu <lu_type> :: P_vec (void) const
 {
@@ -171,7 +171,7 @@
   return p;
 }
 
-template <class lu_type>
+template <typename lu_type>
 bool
 base_lu<lu_type>::regular (void) const
 {
--- a/liboctave/numeric/base-lu.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/base-lu.h	Sun Jan 24 13:50:04 2016 -0500
@@ -28,7 +28,7 @@
 #include "dColVector.h"
 #include "PermMatrix.h"
 
-template <class lu_type>
+template <typename lu_type>
 class
 base_lu
 {
--- a/liboctave/numeric/base-qr.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/base-qr.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -26,7 +26,7 @@
 
 #include "base-qr.h"
 
-template <class qr_type>
+template <typename qr_type>
 base_qr<qr_type>::base_qr (const qr_type& q_arg, const qr_type& r_arg)
   : q (q_arg), r (r_arg)
 {
@@ -44,7 +44,7 @@
     }
 }
 
-template <class qr_type>
+template <typename qr_type>
 qr_type_t
 base_qr<qr_type>::get_type (void) const
 {
@@ -60,7 +60,7 @@
   return retval;
 }
 
-template <class qr_type>
+template <typename qr_type>
 bool
 base_qr<qr_type>::regular (void) const
 {
--- a/liboctave/numeric/base-qr.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/base-qr.h	Sun Jan 24 13:50:04 2016 -0500
@@ -34,7 +34,7 @@
   qr_type_economy
 };
 
-template <class qr_type>
+template <typename qr_type>
 class
 base_qr
 {
--- a/liboctave/numeric/bsxfun-defs.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/bsxfun-defs.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -33,7 +33,7 @@
 
 #include "mx-inlines.cc"
 
-template <class R, class X, class Y>
+template <typename R, typename X, typename Y>
 Array<R>
 do_bsxfun_op (const Array<X>& x, const Array<Y>& y,
               void (*op_vv) (size_t, R *, const X *, const Y *),
@@ -134,7 +134,7 @@
   return retval;
 }
 
-template <class R, class X>
+template <typename R, typename X>
 void
 do_inplace_bsxfun_op (Array<R>& r, const Array<X>& x,
                       void (*op_vv) (size_t, R *, const X *),
--- a/liboctave/numeric/eigs-base.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/eigs-base.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -216,7 +216,7 @@
      "an eigenvalue so convergence is not guaranteed");
 }
 
-template <class M, class SM>
+template <typename M, typename SM>
 static octave_idx_type
 lusolve (const SM& L, const SM& U, M& m)
 {
@@ -234,7 +234,7 @@
   return err;
 }
 
-template <class SM, class M>
+template <typename SM, typename M>
 static M
 ltsolve (const SM& L, const ColumnVector& Q, const M& m)
 {
@@ -261,7 +261,7 @@
   return retval;
 }
 
-template <class SM, class M>
+template <typename SM, typename M>
 static M
 utsolve (const SM& U, const ColumnVector& Q, const M& m)
 {
@@ -749,7 +749,7 @@
   return true;
 }
 
-template <class M>
+template <typename M>
 octave_idx_type
 EigsRealSymmetricMatrix (const M& m, const std::string typ,
                          octave_idx_type k, octave_idx_type p,
@@ -1019,7 +1019,7 @@
   return ip(4);
 }
 
-template <class M>
+template <typename M>
 octave_idx_type
 EigsRealSymmetricMatrixShift (const M& m, double sigma,
                               octave_idx_type k, octave_idx_type p,
@@ -1543,7 +1543,7 @@
   return ip(4);
 }
 
-template <class M>
+template <typename M>
 octave_idx_type
 EigsRealNonSymmetricMatrix (const M& m, const std::string typ,
                             octave_idx_type k, octave_idx_type p,
@@ -1861,7 +1861,7 @@
   return ip(4);
 }
 
-template <class M>
+template <typename M>
 octave_idx_type
 EigsRealNonSymmetricMatrixShift (const M& m, double sigmar,
                                  octave_idx_type k, octave_idx_type p,
@@ -2488,7 +2488,7 @@
   return ip(4);
 }
 
-template <class M>
+template <typename M>
 octave_idx_type
 EigsComplexNonSymmetricMatrix (const M& m, const std::string typ,
                                octave_idx_type k, octave_idx_type p,
@@ -2760,7 +2760,7 @@
   return ip(4);
 }
 
-template <class M>
+template <typename M>
 octave_idx_type
 EigsComplexNonSymmetricMatrixShift (const M& m, Complex sigma,
                                     octave_idx_type k, octave_idx_type p,
--- a/liboctave/numeric/lo-mappers.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/lo-mappers.h	Sun Jan 24 13:50:04 2016 -0500
@@ -75,13 +75,13 @@
 extern OCTAVE_API bool octave_is_NA (double x);
 
 // Generic xmin, xmax definitions
-template <class T>
+template <typename T>
 inline T xmin (T x, T y)
 {
   return x <= y ? x : y;
 }
 
-template <class T>
+template <typename T>
 inline T xmax (T x, T y)
 {
   return x >= y ? x : y;
--- a/liboctave/numeric/lo-specfun.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/lo-specfun.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -3692,7 +3692,7 @@
 
 static const double pi = 3.14159265358979323846;
 
-template <class T>
+template <typename T>
 static inline T
 xlog (const T& x)
 {
@@ -3713,7 +3713,7 @@
   return gnulib::logf (x);
 }
 
-template<class T>
+template <typename T>
 static T
 Lanczos_approximation_psi (const T zc)
 {
@@ -3739,7 +3739,7 @@
   return p;
 }
 
-template<class T>
+template <typename T>
 T
 psi (const T& z)
 {
@@ -3795,7 +3795,7 @@
 template double psi<double> (const double& z);
 template float  psi<float> (const float& z);
 
-template<class T>
+template <typename T>
 std::complex<T>
 psi (const std::complex<T>& z)
 {
@@ -3845,12 +3845,12 @@
 template FloatComplex psi<float> (const FloatComplex& z);
 
 
-template<typename T>
+template <typename T>
 static inline void
 fortran_psifn (const T z, const octave_idx_type n, T* ans,
                octave_idx_type* ierr);
 
-template<>
+template <>
 inline void
 fortran_psifn<double> (const double z, const octave_idx_type n,
                        double* ans, octave_idx_type* ierr)
@@ -3859,7 +3859,7 @@
   F77_XFCN (dpsifn, DPSIFN, (&z, n, 1, 1, ans, &flag, ierr));
 }
 
-template<>
+template <>
 inline void
 fortran_psifn<float> (const float z, const octave_idx_type n,
                       float* ans, octave_idx_type* ierr)
@@ -3868,7 +3868,7 @@
   F77_XFCN (psifn, PSIFN, (&z, n, 1, 1, ans, &flag, ierr));
 }
 
-template<class T>
+template <typename T>
 T
 psi (const octave_idx_type n, const T z)
 {
--- a/liboctave/numeric/lo-specfun.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/lo-specfun.h	Sun Jan 24 13:50:04 2016 -0500
@@ -666,13 +666,13 @@
 //! Digamma function.
 //!
 //! Only defined for double and float.
-template<class T>
+template <typename T>
 extern OCTAVE_API T psi (const T& z);
 
 //! Digamma function for complex input.
 //!
 //! Only defined for double and float.
-template<class T>
+template <typename T>
 extern OCTAVE_API std::complex<T> psi (const std::complex<T>& z);
 
 //! Polygamma function.
@@ -680,7 +680,7 @@
 //! Only defined for double and float.
 //! @param n must be non-negative.  If zero, the digamma function is computed.
 //! @param z must be real and non-negative.
-template<class T>
+template <typename T>
 extern OCTAVE_API T psi (const octave_idx_type n, const T z);
 
 #endif
--- a/liboctave/numeric/oct-convn.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/oct-convn.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -33,7 +33,7 @@
 #include "oct-locbuf.h"
 
 // 2d convolution with a matrix kernel.
-template <class T, class R>
+template <typename T, typename R>
 static void
 convolve_2d (const T *a, octave_idx_type ma, octave_idx_type na,
              const R *b, octave_idx_type mb, octave_idx_type nb,
@@ -73,7 +73,7 @@
 FORWARD_IMPL (Complex, double, zd, ZD)
 FORWARD_IMPL (FloatComplex, float, cs, CS)
 
-template <class T, class R>
+template <typename T, typename R>
 void convolve_nd (const T *a, const dim_vector& ad, const dim_vector& acd,
                   const R *b, const dim_vector& bd, const dim_vector& bcd,
                   T *c, const dim_vector& ccd, int nd, bool inner)
@@ -107,7 +107,7 @@
 
 // Arbitrary convolutor.
 // The 2nd array is assumed to be the smaller one.
-template <class T, class R>
+template <typename T, typename R>
 static MArray<T>
 convolve (const MArray<T>& a, const MArray<R>& b,
           convn_type ct)
--- a/liboctave/numeric/oct-fftw.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/oct-fftw.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -738,7 +738,7 @@
   return ret;
 }
 
-template <class T>
+template <typename T>
 static inline void
 convert_packcomplex_1d (T *out, size_t nr, size_t nc,
                         octave_idx_type stride, octave_idx_type dist)
@@ -754,7 +754,7 @@
   octave_quit ();
 }
 
-template <class T>
+template <typename T>
 static inline void
 convert_packcomplex_Nd (T *out, const dim_vector &dv)
 {
--- a/liboctave/numeric/oct-norm.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/oct-norm.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -67,7 +67,7 @@
 // the Matrix p-Norm." Numer. Math. 62, 539-555, 1992.
 
 // norm accumulator for the p-norm
-template <class R>
+template <typename R>
 class norm_accumulator_p
 {
   R p,scl,sum;
@@ -75,7 +75,7 @@
   norm_accumulator_p () {} // we need this one for Array
   norm_accumulator_p (R pp) : p(pp), scl(0), sum(1) {}
 
-  template<class U>
+  template <typename U>
   void accum (U val)
   {
     octave_quit ();
@@ -95,7 +95,7 @@
 };
 
 // norm accumulator for the minus p-pseudonorm
-template <class R>
+template <typename R>
 class norm_accumulator_mp
 {
   R p,scl,sum;
@@ -103,7 +103,7 @@
   norm_accumulator_mp () {} // we need this one for Array
   norm_accumulator_mp (R pp) : p(pp), scl(0), sum(1) {}
 
-  template<class U>
+  template <typename U>
   void accum (U val)
   {
     octave_quit ();
@@ -123,7 +123,7 @@
 };
 
 // norm accumulator for the 2-norm (euclidean)
-template <class R>
+template <typename R>
 class norm_accumulator_2
 {
   R scl,sum;
@@ -156,13 +156,13 @@
 };
 
 // norm accumulator for the 1-norm (city metric)
-template <class R>
+template <typename R>
 class norm_accumulator_1
 {
   R sum;
 public:
   norm_accumulator_1 () : sum (0) {}
-  template<class U>
+  template <typename U>
   void accum (U val)
   {
     sum += std::abs (val);
@@ -171,13 +171,13 @@
 };
 
 // norm accumulator for the inf-norm (max metric)
-template <class R>
+template <typename R>
 class norm_accumulator_inf
 {
   R max;
 public:
   norm_accumulator_inf () : max (0) {}
-  template<class U>
+  template <typename U>
   void accum (U val)
   {
     max = std::max (max, std::abs (val));
@@ -186,13 +186,13 @@
 };
 
 // norm accumulator for the -inf pseudonorm (min abs value)
-template <class R>
+template <typename R>
 class norm_accumulator_minf
 {
   R min;
 public:
   norm_accumulator_minf () : min (octave_Inf) {}
-  template<class U>
+  template <typename U>
   void accum (U val)
   {
     min = std::min (min, std::abs (val));
@@ -201,13 +201,13 @@
 };
 
 // norm accumulator for the 0-pseudonorm (hamming distance)
-template <class R>
+template <typename R>
 class norm_accumulator_0
 {
   unsigned int num;
 public:
   norm_accumulator_0 () : num (0) {}
-  template<class U>
+  template <typename U>
   void accum (U val)
   {
     if (val != static_cast<U> (0)) ++num;
@@ -218,7 +218,7 @@
 
 // OK, we're armed :) Now let's go for the fun
 
-template <class T, class R, class ACC>
+template <typename T, typename R, typename ACC>
 inline void vector_norm (const Array<T>& v, R& res, ACC acc)
 {
   for (octave_idx_type i = 0; i < v.numel (); i++)
@@ -228,7 +228,7 @@
 }
 
 // dense versions
-template <class T, class R, class ACC>
+template <typename T, typename R, typename ACC>
 void column_norms (const MArray<T>& m, MArray<R>& res, ACC acc)
 {
   res = MArray<R> (dim_vector (1, m.columns ()));
@@ -242,7 +242,7 @@
     }
 }
 
-template <class T, class R, class ACC>
+template <typename T, typename R, typename ACC>
 void row_norms (const MArray<T>& m, MArray<R>& res, ACC acc)
 {
   res = MArray<R> (dim_vector (m.rows (), 1));
@@ -258,7 +258,7 @@
 }
 
 // sparse versions
-template <class T, class R, class ACC>
+template <typename T, typename R, typename ACC>
 void column_norms (const MSparse<T>& m, MArray<R>& res, ACC acc)
 {
   res = MArray<R> (dim_vector (1, m.columns ()));
@@ -272,7 +272,7 @@
     }
 }
 
-template <class T, class R, class ACC>
+template <typename T, typename R, typename ACC>
 void row_norms (const MSparse<T>& m, MArray<R>& res, ACC acc)
 {
   res = MArray<R> (dim_vector (m.rows (), 1));
@@ -289,7 +289,7 @@
 
 // now the dispatchers
 #define DEFINE_DISPATCHER(FUNC_NAME, ARG_TYPE, RES_TYPE) \
-template <class T, class R> \
+template <typename T, typename R> \
 RES_TYPE FUNC_NAME (const ARG_TYPE& v, R p) \
 { \
   RES_TYPE res; \
@@ -322,7 +322,7 @@
 // The approximate subproblem in Higham's method. Find lambda and mu such that
 // norm ([lambda, mu], p) == 1 and norm (y*lambda + col*mu, p) is maximized.
 // Real version. As in Higham's paper.
-template <class ColVectorT, class R>
+template <typename ColVectorT, typename R>
 static void
 higham_subp (const ColVectorT& y, const ColVectorT& col,
              octave_idx_type nsamp, R p, R& lambda, R& mu)
@@ -350,7 +350,7 @@
 // Complex version. Higham's paper does not deal with complex case, so we use a
 // simple extension. First, guess the magnitudes as in real version, then try
 // to rotate lambda to improve further.
-template <class ColVectorT, class R>
+template <typename ColVectorT, typename R>
 static void
 higham_subp (const ColVectorT& y, const ColVectorT& col,
              octave_idx_type nsamp, R p,
@@ -395,7 +395,7 @@
 }
 
 // the p-dual element (should work for both real and complex)
-template <class T, class R>
+template <typename T, typename R>
 inline T elem_dual_p (T x, R p)
 {
   return signum (x) * std::pow (std::abs (x), p-1);
@@ -405,7 +405,7 @@
 // a Matrix type to allow all the operations. For instance SparseMatrix
 // does not support multiplication with column/row vectors.
 // the dual vector
-template <class VectorT, class R>
+template <typename VectorT, typename R>
 VectorT dual_p (const VectorT& x, R p, R q)
 {
   VectorT res (x.dims ());
@@ -415,7 +415,7 @@
 }
 
 // Higham's hybrid method
-template <class MatrixT, class VectorT, class R>
+template <typename MatrixT, typename VectorT, typename R>
 R higham (const MatrixT& m, R p, R tol, int maxiter,
           VectorT& x)
 {
@@ -475,7 +475,7 @@
 static int max_norm_iter = 100;
 
 // version with SVD for dense matrices
-template <class MatrixT, class VectorT, class SVDT, class R>
+template <typename MatrixT, typename VectorT, typename SVDT, typename R>
 R matrix_norm (const MatrixT& m, R p, VectorT, SVDT)
 {
   R res = 0;
@@ -501,7 +501,7 @@
 }
 
 // SVD-free version for sparse matrices
-template <class MatrixT, class VectorT, class R>
+template <typename MatrixT, typename VectorT, typename R>
 R matrix_norm (const MatrixT& m, R p, VectorT)
 {
   R res = 0;
@@ -539,7 +539,7 @@
 DEFINE_XNORM_FUNCS(FloatComplex, float)
 
 // this is needed to avoid copying the sparse matrix for xfrobnorm
-template <class T, class R>
+template <typename T, typename R>
 inline void array_norm_2 (const T* v, octave_idx_type n, R& res)
 {
   norm_accumulator_2<R> acc;
--- a/liboctave/numeric/sparse-base-chol.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/sparse-base-chol.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -35,7 +35,7 @@
 
 #ifdef HAVE_CHOLMOD
 // Can't use CHOLMOD_NAME(drop)(0.0, S, cm). It doesn't treat complex matrices
-template <class chol_type, class chol_elt, class p_type>
+template <typename chol_type, typename chol_elt, typename p_type>
 void
 sparse_base_chol<chol_type, chol_elt, p_type>::sparse_base_chol_rep::drop_zeros
   (const cholmod_sparse* S)
@@ -77,7 +77,7 @@
 }
 #endif
 
-template <class chol_type, class chol_elt, class p_type>
+template <typename chol_type, typename chol_elt, typename p_type>
 octave_idx_type
 sparse_base_chol<chol_type, chol_elt, p_type>::sparse_base_chol_rep::init
   (const chol_type& a, bool natural, bool force)
@@ -218,7 +218,7 @@
 #endif
 }
 
-template <class chol_type, class chol_elt, class p_type>
+template <typename chol_type, typename chol_elt, typename p_type>
 chol_type
 sparse_base_chol<chol_type, chol_elt, p_type>::L (void) const
 {
@@ -240,7 +240,7 @@
 #endif
 }
 
-template <class chol_type, class chol_elt, class p_type>
+template <typename chol_type, typename chol_elt, typename p_type>
 p_type
 sparse_base_chol<chol_type, chol_elt, p_type>::
 sparse_base_chol_rep::Q (void) const
@@ -263,7 +263,7 @@
 #endif
 }
 
-template <class chol_type, class chol_elt, class p_type>
+template <typename chol_type, typename chol_elt, typename p_type>
 chol_type
 sparse_base_chol<chol_type, chol_elt, p_type>::inverse (void) const
 {
--- a/liboctave/numeric/sparse-base-chol.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/sparse-base-chol.h	Sun Jan 24 13:50:04 2016 -0500
@@ -27,7 +27,7 @@
 #include "oct-sparse.h"
 #include "dColVector.h"
 
-template <class chol_type, class chol_elt, class p_type>
+template <typename chol_type, typename chol_elt, typename p_type>
 class
 sparse_base_chol
 {
--- a/liboctave/numeric/sparse-base-lu.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/sparse-base-lu.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -29,7 +29,7 @@
 
 #include "PermMatrix.h"
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 lu_type
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Y (void) const
 {
@@ -64,7 +64,7 @@
   return Yout;
 }
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 p_type
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pr (void) const
 {
@@ -84,7 +84,7 @@
   return Pout;
 }
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 ColumnVector
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pr_vec (void) const
 {
@@ -99,14 +99,14 @@
   return Pout;
 }
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 PermMatrix
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pr_mat (void) const
 {
   return PermMatrix (P, false);
 }
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 p_type
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pc (void) const
 {
@@ -125,7 +125,7 @@
   return Pout;
 }
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 ColumnVector
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pc_vec (void) const
 {
@@ -140,7 +140,7 @@
   return Pout;
 }
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 PermMatrix
 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pc_mat (void) const
 {
--- a/liboctave/numeric/sparse-base-lu.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/sparse-base-lu.h	Sun Jan 24 13:50:04 2016 -0500
@@ -28,7 +28,7 @@
 #include "MArray.h"
 #include "dSparse.h"
 
-template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
+template <typename lu_type, typename lu_elt_type, typename p_type, typename p_elt_type>
 class
 sparse_base_lu
 {
--- a/liboctave/numeric/sparse-dmsolve.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/numeric/sparse-dmsolve.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -35,7 +35,7 @@
 #include "oct-locbuf.h"
 #include "oct-inttypes.h"
 
-template <class T>
+template <typename T>
 static MSparse<T>
 dmsolve_extract (const MSparse<T> &A, const octave_idx_type *Pinv,
                  const octave_idx_type *Q, octave_idx_type rst,
@@ -125,7 +125,7 @@
                  bool lazy);
 #endif
 
-template <class T>
+template <typename T>
 static MArray<T>
 dmsolve_extract (const MArray<T> &m, const octave_idx_type *,
                  const octave_idx_type *, octave_idx_type r1,
@@ -163,7 +163,7 @@
                  octave_idx_type c2)
 #endif
 
-template <class T>
+template <typename T>
 static void
 dmsolve_insert (MArray<T> &a, const MArray<T> &b, const octave_idx_type *Q,
                 octave_idx_type r, octave_idx_type c)
@@ -195,7 +195,7 @@
                 const octave_idx_type *Q, octave_idx_type r, octave_idx_type c);
 #endif
 
-template <class T>
+template <typename T>
 static void
 dmsolve_insert (MSparse<T> &a, const MSparse<T> &b, const octave_idx_type *Q,
                 octave_idx_type r, octave_idx_type c)
@@ -282,7 +282,7 @@
                 const octave_idx_type *Q, octave_idx_type r, octave_idx_type c);
 #endif
 
-template <class T, class RT>
+template <typename T, typename RT>
 static void
 dmsolve_permute (MArray<RT> &a, const MArray<T>& b, const octave_idx_type *p)
 {
@@ -316,7 +316,7 @@
                  const octave_idx_type *p);
 #endif
 
-template <class T, class RT>
+template <typename T, typename RT>
 static void
 dmsolve_permute (MSparse<RT> &a, const MSparse<T>& b, const octave_idx_type *p)
 {
@@ -369,7 +369,7 @@
   // an error for numerically rank defficient matrices
 }
 
-template <class RT, class ST, class T>
+template <typename RT, typename ST, typename T>
 RT
 dmsolve (const ST &a, const T &b, octave_idx_type &info)
 {
--- a/liboctave/operators/mx-inlines.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/operators/mx-inlines.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -42,26 +42,26 @@
 
 // Provides some commonly repeated, basic loop templates.
 
-template <class R, class S>
+template <typename R, typename S>
 inline void mx_inline_fill (size_t n, R *r, S s) throw ()
 { for (size_t i = 0; i < n; i++) r[i] = s; }
 
 #define DEFMXUNOP(F, OP) \
-template <class R, class X> \
+template <typename R, typename X> \
 inline void F (size_t n, R *r, const X *x) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = OP x[i]; }
 
 DEFMXUNOP (mx_inline_uminus, -)
 
 #define DEFMXUNOPEQ(F, OP) \
-template <class R> \
+template <typename R> \
 inline void F (size_t n, R *r) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = OP r[i]; }
 
 DEFMXUNOPEQ (mx_inline_uminus2, -)
 
 #define DEFMXUNBOOLOP(F, OP) \
-template <class X> \
+template <typename X> \
 inline void F (size_t n, bool *r, const X *x) throw () \
 { const X zero = X (); for (size_t i = 0; i < n; i++) r[i] = x[i] OP zero; }
 
@@ -69,13 +69,13 @@
 DEFMXUNBOOLOP (mx_inline_notzero, !=)
 
 #define DEFMXBINOP(F, OP) \
-template <class R, class X, class Y> \
+template <typename R, typename X, typename Y> \
 inline void F (size_t n, R *r, const X *x, const Y *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y[i]; } \
-template <class R, class X, class Y> \
+template <typename R, typename X, typename Y> \
 inline void F (size_t n, R *r, const X *x, Y y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y; } \
-template <class R, class X, class Y> \
+template <typename R, typename X, typename Y> \
 inline void F (size_t n, R *r, X x, const Y *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = x OP y[i]; }
 
@@ -85,10 +85,10 @@
 DEFMXBINOP (mx_inline_div, /)
 
 #define DEFMXBINOPEQ(F, OP) \
-template <class R, class X> \
+template <typename R, typename X> \
 inline void F (size_t n, R *r, const X *x) throw () \
 { for (size_t i = 0; i < n; i++) r[i] OP x[i]; } \
-template <class R, class X> \
+template <typename R, typename X> \
 inline void F (size_t n, R *r, X x) throw () \
 { for (size_t i = 0; i < n; i++) r[i] OP x; }
 
@@ -98,13 +98,13 @@
 DEFMXBINOPEQ (mx_inline_div2, /=)
 
 #define DEFMXCMPOP(F, OP) \
-template <class X, class Y> \
+template <typename X, typename Y> \
 inline void F (size_t n, bool *r, const X *x, const Y *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y[i]; } \
-template <class X, class Y> \
+template <typename X, typename Y> \
 inline void F (size_t n, bool *r, const X *x, Y y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y; } \
-template <class X, class Y> \
+template <typename X, typename Y> \
 inline void F (size_t n, bool *r, X x, const Y *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = x OP y[i]; }
 
@@ -116,13 +116,13 @@
 DEFMXCMPOP (mx_inline_ne, !=)
 
 // Convert to logical value, for logical op purposes.
-template <class T> inline bool logical_value (T x) { return x; }
-template <class T> inline bool logical_value (const std::complex<T>& x)
+template <typename T> inline bool logical_value (T x) { return x; }
+template <typename T> inline bool logical_value (const std::complex<T>& x)
 { return x.real () != 0 || x.imag () != 0; }
-template <class T> inline bool logical_value (const octave_int<T>& x)
+template <typename T> inline bool logical_value (const octave_int<T>& x)
 { return x.value (); }
 
-template <class X>
+template <typename X>
 void mx_inline_not (size_t n, bool *r, const X* x) throw ()
 {
   for (size_t i = 0; i < n; i++)
@@ -135,20 +135,20 @@
 }
 
 #define DEFMXBOOLOP(F, NOT1, OP, NOT2) \
-template <class X, class Y> \
+template <typename X, typename Y> \
 inline void F (size_t n, bool *r, const X *x, const Y *y) throw () \
 { \
   for (size_t i = 0; i < n; i++) \
     r[i] = (NOT1 logical_value (x[i])) OP (NOT2 logical_value (y[i])); \
 } \
-template <class X, class Y> \
+template <typename X, typename Y> \
 inline void F (size_t n, bool *r, const X *x, Y y) throw () \
 { \
   const bool yy = (NOT2 logical_value (y)); \
   for (size_t i = 0; i < n; i++) \
     r[i] = (NOT1 logical_value (x[i])) OP yy; \
 } \
-template <class X, class Y> \
+template <typename X, typename Y> \
 inline void F (size_t n, bool *r, X x, const Y *y) throw () \
 { \
   const bool xx = (NOT1 logical_value (x)); \
@@ -164,20 +164,20 @@
 DEFMXBOOLOP (mx_inline_or_not, , |, !)
 
 #define DEFMXBOOLOPEQ(F, OP) \
-template <class X> \
+template <typename X> \
 inline void F (size_t n, bool *r, const X *x) throw () \
 { \
   for (size_t i = 0; i < n; i++) \
     r[i] OP logical_value (x[i]); \
 } \
-template <class X> \
+template <typename X> \
 inline void F (size_t n, bool *r, X x) throw () \
 { for (size_t i = 0; i < n; i++) r[i] OP x; }
 
 DEFMXBOOLOPEQ (mx_inline_and2, &=)
 DEFMXBOOLOPEQ (mx_inline_or2, |=)
 
-template <class T>
+template <typename T>
 inline bool
 mx_inline_any_nan (size_t n, const T* x)  throw ()
 {
@@ -190,7 +190,7 @@
   return false;
 }
 
-template <class T>
+template <typename T>
 inline bool
 mx_inline_all_finite (size_t n, const T* x)  throw ()
 {
@@ -203,7 +203,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 inline bool
 mx_inline_any_negative (size_t n, const T* x) throw ()
 {
@@ -216,7 +216,7 @@
   return false;
 }
 
-template <class T>
+template <typename T>
 inline bool
 mx_inline_any_positive (size_t n, const T* x) throw ()
 {
@@ -229,7 +229,7 @@
   return false;
 }
 
-template<class T>
+template <typename T>
 inline bool
 mx_inline_all_real (size_t n, const std::complex<T>* x) throw ()
 {
@@ -243,26 +243,26 @@
 }
 
 #define DEFMXMAPPER(F, FUN) \
-template <class T> \
+template <typename T> \
 inline void F (size_t n, T *r, const T *x) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i]); }
 
-template<class T>
+template <typename T>
 inline void mx_inline_real (size_t n, T *r, const std::complex<T>* x) throw ()
 { for (size_t i = 0; i < n; i++) r[i] = x[i].real (); }
-template<class T>
+template <typename T>
 inline void mx_inline_imag (size_t n, T *r, const std::complex<T>* x) throw ()
 { for (size_t i = 0; i < n; i++) r[i] = x[i].imag (); }
 
 // Pairwise minimums/maximums
 #define DEFMXMAPPER2(F, FUN) \
-template <class T> \
+template <typename T> \
 inline void F (size_t n, T *r, const T *x, const T *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y[i]); } \
-template <class T> \
+template <typename T> \
 inline void F (size_t n, T *r, const T *x, T y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y); } \
-template <class T> \
+template <typename T> \
 inline void F (size_t n, T *r, T x, const T *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x, y[i]); }
 
@@ -295,13 +295,13 @@
 
 // Pairwise power
 #define DEFMXMAPPER2X(F, FUN) \
-template <class R, class X, class Y> \
+template <typename R, typename X, typename Y> \
 inline void F (size_t n, R *r, const X *x, const Y *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y[i]); } \
-template <class R, class X, class Y> \
+template <typename R, typename X, typename Y> \
 inline void F (size_t n, R *r, const X *x, Y y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y); } \
-template <class R, class X, class Y> \
+template <typename R, typename X, typename Y> \
 inline void F (size_t n, R *r, X x, const Y *y) throw () \
 { for (size_t i = 0; i < n; i++) r[i] = FUN (x, y[i]); }
 
@@ -312,18 +312,18 @@
 
 // Arbitrary function appliers. The function is a template parameter to enable
 // inlining.
-template <class R, class X, R fun (X x)>
+template <typename R, typename X, R fun (X x)>
 inline void mx_inline_map (size_t n, R *r, const X *x) throw ()
 { for (size_t i = 0; i < n; i++) r[i] = fun (x[i]); }
 
-template <class R, class X, R fun (const X& x)>
+template <typename R, typename X, R fun (const X& x)>
 inline void mx_inline_map (size_t n, R *r, const X *x) throw ()
 { for (size_t i = 0; i < n; i++) r[i] = fun (x[i]); }
 
 // Appliers. Since these call the operation just once, we pass it as
 // a pointer, to allow the compiler reduce number of instances.
 
-template <class R, class X>
+template <typename R, typename X>
 inline Array<R>
 do_mx_unary_op (const Array<X>& x,
                 void (*op) (size_t, R *, const X *) throw ())
@@ -335,21 +335,21 @@
 
 // Shortcuts for applying mx_inline_map.
 
-template <class R, class X, R fun (X)>
+template <typename R, typename X, R fun (X)>
 inline Array<R>
 do_mx_unary_map (const Array<X>& x)
 {
   return do_mx_unary_op<R, X> (x, mx_inline_map<R, X, fun>);
 }
 
-template <class R, class X, R fun (const X&)>
+template <typename R, typename X, R fun (const X&)>
 inline Array<R>
 do_mx_unary_map (const Array<X>& x)
 {
   return do_mx_unary_op<R, X> (x, mx_inline_map<R, X, fun>);
 }
 
-template <class R>
+template <typename R>
 inline Array<R>&
 do_mx_inplace_op (Array<R>& r,
                   void (*op) (size_t, R *) throw ())
@@ -358,7 +358,7 @@
   return r;
 }
 
-template <class R, class X, class Y>
+template <typename R, typename X, typename Y>
 inline Array<R>
 do_mm_binary_op (const Array<X>& x, const Array<Y>& y,
                  void (*op) (size_t, R *, const X *, const Y *) throw (),
@@ -382,7 +382,7 @@
     err_nonconformant (opname, dx, dy);
 }
 
-template <class R, class X, class Y>
+template <typename R, typename X, typename Y>
 inline Array<R>
 do_ms_binary_op (const Array<X>& x, const Y& y,
                  void (*op) (size_t, R *, const X *, Y) throw ())
@@ -392,7 +392,7 @@
   return r;
 }
 
-template <class R, class X, class Y>
+template <typename R, typename X, typename Y>
 inline Array<R>
 do_sm_binary_op (const X& x, const Array<Y>& y,
                  void (*op) (size_t, R *, X, const Y *) throw ())
@@ -402,7 +402,7 @@
   return r;
 }
 
-template <class R, class X>
+template <typename R, typename X>
 inline Array<R>&
 do_mm_inplace_op (Array<R>& r, const Array<X>& x,
                   void (*op) (size_t, R *, const X *) throw (),
@@ -421,7 +421,7 @@
   return r;
 }
 
-template <class R, class X>
+template <typename R, typename X>
 inline Array<R>&
 do_ms_inplace_op (Array<R>& r, const X& x,
                   void (*op) (size_t, R *, X) throw ())
@@ -430,7 +430,7 @@
   return r;
 }
 
-template <class T1, class T2>
+template <typename T1, typename T2>
 inline bool
 mx_inline_equal (size_t n, const T1 *x, const T2 *y) throw ()
 {
@@ -440,7 +440,7 @@
   return true;
 }
 
-template <class T>
+template <typename T>
 inline bool
 do_mx_check (const Array<T>& a,
              bool (*op) (size_t, const T *) throw ())
@@ -450,19 +450,19 @@
 
 // NOTE: we don't use std::norm because it typically does some heavyweight
 // magic to avoid underflows, which we don't need here.
-template <class T>
+template <typename T>
 inline T cabsq (const std::complex<T>& c)
 { return c.real () * c.real () + c.imag () * c.imag (); }
 
 // default. works for integers and bool.
-template <class T>
+template <typename T>
 inline bool xis_true (T x) { return x; }
-template <class T>
+template <typename T>
 inline bool xis_false (T x) { return ! x; }
 // for octave_ints
-template <class T>
+template <typename T>
 inline bool xis_true (const octave_int<T>& x) { return x.value (); }
-template <class T>
+template <typename T>
 inline bool xis_false (const octave_int<T>& x) { return ! x.value (); }
 // for reals, we want to ignore NaNs.
 inline bool xis_true (double x) { return ! xisnan (x) && x != 0.0; }
@@ -484,7 +484,7 @@
 { ac *= el; }
 inline void op_dble_prod (Complex& ac, const FloatComplex& el)
 { ac *= el; } // FIXME: guaranteed?
-template <class T>
+template <typename T>
 inline void op_dble_prod (double& ac, const octave_int<T>& el)
 { ac *= el.double_value (); }
 
@@ -492,7 +492,7 @@
 { ac += el; }
 inline void op_dble_sum (Complex& ac, const FloatComplex& el)
 { ac += el; } // FIXME: guaranteed?
-template <class T>
+template <typename T>
 inline void op_dble_sum (double& ac, const octave_int<T>& el)
 { ac += el.double_value (); }
 
@@ -501,7 +501,7 @@
 #define OP_RED_ALLC(ac, el) if (xis_false (el)) { ac = false; break; } else continue
 
 #define OP_RED_FCN(F, TSRC, TRES, OP, ZERO) \
-template <class T> \
+template <typename T> \
 inline TRES \
 F (const TSRC* v, octave_idx_type n) \
 { \
@@ -525,7 +525,7 @@
 
 
 #define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const TSRC* v, TRES *r, octave_idx_type m, octave_idx_type n) \
 { \
@@ -558,7 +558,7 @@
 // will achieve both, at the cost of a temporary octave_idx_type array.
 
 #define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T* v, bool *r, octave_idx_type m, octave_idx_type n) \
 { \
@@ -589,7 +589,7 @@
 OP_ROW_SHORT_CIRCUIT (mx_inline_all, xis_false, true)
 
 #define OP_RED_FCNN(F, TSRC, TRES) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const TSRC *v, TRES *r, octave_idx_type l, \
    octave_idx_type n, octave_idx_type u) \
@@ -624,7 +624,7 @@
 OP_RED_FCNN (mx_inline_all, T, bool)
 
 #define OP_CUM_FCN(F, TSRC, TRES, OP) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const TSRC *v, TRES *r, octave_idx_type n) \
 { \
@@ -641,7 +641,7 @@
 OP_CUM_FCN (mx_inline_cumcount, bool, T, +)
 
 #define OP_CUM_FCN2(F, TSRC, TRES, OP) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
 { \
@@ -665,7 +665,7 @@
 OP_CUM_FCN2 (mx_inline_cumcount, bool, T, +)
 
 #define OP_CUM_FCNN(F, TSRC, TRES) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const TSRC *v, TRES *r, octave_idx_type l, \
    octave_idx_type n, octave_idx_type u) \
@@ -694,7 +694,7 @@
 OP_CUM_FCNN (mx_inline_cumcount, bool, T)
 
 #define OP_MINMAX_FCN(F, OP) \
-template <class T> \
+template <typename T> \
 void F (const T *v, T *r, octave_idx_type n) \
 { \
   if (! n) return; \
@@ -709,7 +709,7 @@
     if (v[i] OP tmp) tmp = v[i]; \
   *r = tmp; \
 } \
-template <class T> \
+template <typename T> \
 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
 { \
   if (! n) return; \
@@ -735,7 +735,7 @@
 // proceed to a faster code.
 
 #define OP_MINMAX_FCN2(F, OP) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
 { \
@@ -767,7 +767,7 @@
       j++; v += m; \
     } \
 } \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type *ri, \
    octave_idx_type m, octave_idx_type n) \
@@ -806,7 +806,7 @@
 OP_MINMAX_FCN2 (mx_inline_max, >)
 
 #define OP_MINMAX_FCNN(F) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type l, \
    octave_idx_type n, octave_idx_type u) \
@@ -830,7 +830,7 @@
         } \
     } \
 } \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type *ri, \
    octave_idx_type l, octave_idx_type n, octave_idx_type u) \
@@ -859,7 +859,7 @@
 OP_MINMAX_FCNN (mx_inline_max)
 
 #define OP_CUMMINMAX_FCN(F, OP) \
-template <class T> \
+template <typename T> \
 void F (const T *v, T *r, octave_idx_type n) \
 { \
   if (! n) return; \
@@ -880,7 +880,7 @@
       } \
   for (; j < i; j++) r[j] = tmp; \
 } \
-template <class T> \
+template <typename T> \
 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
 { \
   if (! n) return; \
@@ -910,7 +910,7 @@
 // proceed to a faster code.
 
 #define OP_CUMMINMAX_FCN2(F, OP) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
 { \
@@ -948,7 +948,7 @@
       j++; v += m; r0 = r; r += m; \
     } \
 } \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type *ri, \
    octave_idx_type m, octave_idx_type n) \
@@ -992,7 +992,7 @@
 OP_CUMMINMAX_FCN2 (mx_inline_cummax, >)
 
 #define OP_CUMMINMAX_FCNN(F) \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type l, \
    octave_idx_type n, octave_idx_type u) \
@@ -1016,7 +1016,7 @@
         } \
     } \
 } \
-template <class T> \
+template <typename T> \
 inline void \
 F (const T *v, T *r, octave_idx_type *ri, \
    octave_idx_type l, octave_idx_type n, octave_idx_type u) \
@@ -1044,7 +1044,7 @@
 OP_CUMMINMAX_FCNN (mx_inline_cummin)
 OP_CUMMINMAX_FCNN (mx_inline_cummax)
 
-template <class T>
+template <typename T>
 void mx_inline_diff (const T *v, T *r, octave_idx_type n,
                      octave_idx_type order)
 {
@@ -1085,7 +1085,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void mx_inline_diff (const T *v, T *r,
                      octave_idx_type m, octave_idx_type n,
                      octave_idx_type order)
@@ -1125,7 +1125,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 inline void
 mx_inline_diff (const T *v, T *r,
                 octave_idx_type l, octave_idx_type n, octave_idx_type u,
@@ -1183,7 +1183,7 @@
 // FIXME: is this the best design? C++ gives a lot of options here...
 // maybe it can be done without an explicit parameter?
 
-template <class R, class T>
+template <typename R, typename T>
 inline Array<R>
 do_mx_red_op (const Array<T>& src, int dim,
               void (*mx_red_op) (const T *, R *, octave_idx_type,
@@ -1207,7 +1207,7 @@
   return ret;
 }
 
-template <class R, class T>
+template <typename R, typename T>
 inline Array<R>
 do_mx_cum_op (const Array<T>& src, int dim,
               void (*mx_cum_op) (const T *, R *, octave_idx_type,
@@ -1224,7 +1224,7 @@
   return ret;
 }
 
-template <class R>
+template <typename R>
 inline Array<R>
 do_mx_minmax_op (const Array<R>& src, int dim,
                  void (*mx_minmax_op) (const R *, R *, octave_idx_type,
@@ -1244,7 +1244,7 @@
   return ret;
 }
 
-template <class R>
+template <typename R>
 inline Array<R>
 do_mx_minmax_op (const Array<R>& src, Array<octave_idx_type>& idx, int dim,
                  void (*mx_minmax_op) (const R *, R *, octave_idx_type *,
@@ -1267,7 +1267,7 @@
   return ret;
 }
 
-template <class R>
+template <typename R>
 inline Array<R>
 do_mx_cumminmax_op (const Array<R>& src, int dim,
                     void (*mx_cumminmax_op) (const R *, R *, octave_idx_type,
@@ -1283,7 +1283,7 @@
   return ret;
 }
 
-template <class R>
+template <typename R>
 inline Array<R>
 do_mx_cumminmax_op (const Array<R>& src, Array<octave_idx_type>& idx, int dim,
                     void (*mx_cumminmax_op) (const R *, R *, octave_idx_type *,
@@ -1302,7 +1302,7 @@
   return ret;
 }
 
-template <class R>
+template <typename R>
 inline Array<R>
 do_mx_diff_op (const Array<R>& src, int dim, octave_idx_type order,
                void (*mx_diff_op) (const R *, R *,
@@ -1340,7 +1340,7 @@
 // Accurate Sum And Dot Product,
 // SIAM J. Sci. Computing, Vol. 26, 2005
 
-template <class T>
+template <typename T>
 inline void twosum_accum (T& s, T& e,
                           const T& x)
 {
@@ -1351,7 +1351,7 @@
   e += e1;
 }
 
-template <class T>
+template <typename T>
 inline T
 mx_inline_xsum (const T *v, octave_idx_type n)
 {
@@ -1363,7 +1363,7 @@
   return s + e;
 }
 
-template <class T>
+template <typename T>
 inline void
 mx_inline_xsum (const T *v, T *r,
                 octave_idx_type m, octave_idx_type n)
--- a/liboctave/util/action-container.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/action-container.h	Sun Jan 24 13:50:04 2016 -0500
@@ -74,7 +74,7 @@
   // An element that stores a variable of type T along with a void (*) (T)
   // function pointer, and calls the function with the parameter.
 
-  template <class T>
+  template <typename T>
   class fcn_arg_elem : public elem
   {
   public:
@@ -99,7 +99,7 @@
   // void (*) (const T&) function pointer, and calls the function with
   // the parameter.
 
-  template <class T>
+  template <typename T>
   class fcn_crefarg_elem : public elem
   {
   public:
@@ -115,7 +115,7 @@
 
   // An element for calling a member function.
 
-  template <class T>
+  template <typename T>
   class method_elem : public elem
   {
   public:
@@ -138,7 +138,7 @@
 
   // An element for calling a member function with a single argument
 
-  template <class T, class A>
+  template <typename T, typename A>
   class method_arg_elem : public elem
   {
   public:
@@ -162,7 +162,7 @@
 
   // An element for calling a member function with a single argument
 
-  template <class T, class A>
+  template <typename T, typename A>
   class method_crefarg_elem : public elem
   {
   public:
@@ -186,7 +186,7 @@
 
   // An element that stores arbitrary variable, and restores it.
 
-  template <class T>
+  template <typename T>
   class restore_var_elem : public elem
   {
   public:
@@ -208,7 +208,7 @@
 
   // Deletes a class allocated using new.
 
-  template <class T>
+  template <typename T>
   class delete_ptr_elem : public elem
   {
   public:
@@ -241,35 +241,35 @@
   }
 
   // Call to void func (T).
-  template <class T>
+  template <typename T>
   void add_fcn (void (*action) (T), T val)
   {
     add (new fcn_arg_elem<T> (action, val));
   }
 
   // Call to void func (const T&).
-  template <class T>
+  template <typename T>
   void add_fcn (void (*action) (const T&), const T& val)
   {
     add (new fcn_crefarg_elem<T> (action, val));
   }
 
   // Call to T::method (void).
-  template <class T>
+  template <typename T>
   void add_method (T *obj, void (T::*method) (void))
   {
     add (new method_elem<T> (obj, method));
   }
 
   // Call to T::method (A).
-  template <class T, class A>
+  template <typename T, typename A>
   void add_method (T *obj, void (T::*method) (A), A arg)
   {
     add (new method_arg_elem<T, A> (obj, method, arg));
   }
 
   // Call to T::method (const A&).
-  template <class T, class A>
+  template <typename T, typename A>
   void add_method (T *obj, void (T::*method) (const A&), const A& arg)
   {
     add (new method_crefarg_elem<T, A> (obj, method, arg));
@@ -277,21 +277,21 @@
 
   // Call to delete (T*).
 
-  template <class T>
+  template <typename T>
   void add_delete (T *obj)
   {
     add (new delete_ptr_elem<T> (obj));
   }
 
   // Protect any variable.
-  template <class T>
+  template <typename T>
   void protect_var (T& var)
   {
     add (new restore_var_elem<T> (var, var));
   }
 
   // Protect any variable, value given.
-  template <class T>
+  template <typename T>
   void protect_var (T& var, const T& val)
   {
     add (new restore_var_elem<T> (var, val));
--- a/liboctave/util/base-list.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/base-list.h	Sun Jan 24 13:50:04 2016 -0500
@@ -46,7 +46,7 @@
 
   iterator erase (iterator pos) { return lst.erase (pos); }
 
-  template <class P>
+  template <typename P>
   void remove_if (P pred)
   {
     lst.remove_if (pred);
--- a/liboctave/util/lo-traits.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/lo-traits.h	Sun Jan 24 13:50:04 2016 -0500
@@ -32,7 +32,7 @@
 template <bool cond, typename T1, typename T2>
 class if_then_else;
 
-template<typename T1, typename T2>
+template <typename T1, typename T2>
 class if_then_else<true, T1, T2>
 {
 public:
@@ -40,7 +40,7 @@
   typedef T1 result;
 };
 
-template<typename T1, typename T2>
+template <typename T1, typename T2>
 class if_then_else<false, T1, T2>
 {
 public:
@@ -49,7 +49,7 @@
 };
 
 // Determine whether two types are equal.
-template <class T1, class T2>
+template <typename T1, typename T2>
 class equal_types
 {
 public:
@@ -57,7 +57,7 @@
   static const bool value = false;
 };
 
-template <class T>
+template <typename T>
 class equal_types <T, T>
 {
 public:
@@ -67,7 +67,7 @@
 
 // Determine whether a type is an instance of a template.
 
-template <template <class> class Template, class T>
+template <template <typename> class Template, typename T>
 class is_instance
 {
 public:
@@ -75,7 +75,7 @@
   static const bool value = false;
 };
 
-template <template <class> class Template, class T>
+template <template <typename> class Template, typename T>
 class is_instance <Template, Template<T> >
 {
 public:
@@ -85,7 +85,7 @@
 
 // Determine whether a template paramter is a class type.
 
-template<typename T1>
+template <typename T1>
 class is_class_type
 {
 private:
@@ -94,10 +94,10 @@
   typedef struct { char c[2]; } two;
 
   // Classes can have pointers to members.
-  template<typename T2> static one is_class_type_test (int T2::*);
+  template <typename T2> static one is_class_type_test (int T2::*);
 
   // Catch everything else.
-  template<typename T2> static two is_class_type_test (...);
+  template <typename T2> static two is_class_type_test (...);
 
 public:
 
@@ -108,7 +108,7 @@
 // Define typename ref_param<T>::type as T const& if T is a class
 // type.  Otherwise, define it to be T.
 
-template<typename T>
+template <typename T>
 class ref_param
 {
 public:
@@ -119,14 +119,14 @@
 // Will turn TemplatedClass<T> to T, leave T otherwise.
 // Useful for stripping wrapper classes, like octave_int.
 
-template<template<typename> class TemplatedClass, typename T>
+template <template <typename> class TemplatedClass, typename T>
 class strip_template_param
 {
 public:
   typedef T type;
 };
 
-template<template<typename> class TemplatedClass, typename T>
+template <template <typename> class TemplatedClass, typename T>
 class strip_template_param<TemplatedClass, TemplatedClass<T> >
 {
 public:
@@ -136,14 +136,14 @@
 // Will turn TemplatedClass<T> to TemplatedClass<S>, T to S otherwise.
 // Useful for generic promotions.
 
-template<template<typename> class TemplatedClass, typename T, typename S>
+template <template <typename> class TemplatedClass, typename T, typename S>
 class subst_template_param
 {
 public:
   typedef S type;
 };
 
-template<template<typename> class TemplatedClass, typename T, typename S>
+template <template <typename> class TemplatedClass, typename T, typename S>
 class subst_template_param<TemplatedClass, TemplatedClass<T>, S>
 {
 public:
--- a/liboctave/util/lo-utils.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/lo-utils.h	Sun Jan 24 13:50:04 2016 -0500
@@ -35,7 +35,7 @@
 
 // Generic any/all test functionality with arbitrary predicate.
 
-template <class F, class T, bool zero>
+template <typename F, typename T, bool zero>
 bool
 any_all_test (F fcn, const T *m, octave_idx_type len)
 {
--- a/liboctave/util/oct-base64.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-base64.h	Sun Jan 24 13:50:04 2016 -0500
@@ -25,7 +25,7 @@
 
 #include <string>
 
-template<class T> class Array;
+template <typename T> class Array;
 
 extern OCTAVE_API bool
 octave_base64_encode (const char *inc, const size_t inlen, char **out);
--- a/liboctave/util/oct-binmap.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-binmap.h	Sun Jan 24 13:50:04 2016 -0500
@@ -60,7 +60,7 @@
 // The following template wrappers are provided for automatic bsxfun
 // calls (see the function signature for do_bsxfun_op).
 
-template<typename R, typename X, typename Y, typename F>
+template <typename R, typename X, typename Y, typename F>
 class bsxfun_wrapper
 {
 private:
@@ -96,12 +96,12 @@
 };
 
 // Static init
-template<typename R, typename X, typename Y, typename F>
+template <typename R, typename X, typename Y, typename F>
 F bsxfun_wrapper<R, X, Y, F>::f;
 
 
 // scalar-Array
-template <class U, class T, class R, class F>
+template <typename U, typename T, typename R, typename F>
 Array<U>
 binmap (const T& x, const Array<R>& ya, F fcn)
 {
@@ -132,7 +132,7 @@
 }
 
 // Array-scalar
-template <class U, class T, class R, class F>
+template <typename U, typename T, typename R, typename F>
 Array<U>
 binmap (const Array<T>& xa, const R& y, F fcn)
 {
@@ -163,7 +163,7 @@
 }
 
 // Array-Array (treats singletons as scalars)
-template <class U, class T, class R, class F>
+template <typename U, typename T, typename R, typename F>
 Array<U>
 binmap (const Array<T>& xa, const Array<R>& ya, F fcn, const char *name)
 {
@@ -213,7 +213,7 @@
 }
 
 // scalar-Sparse
-template <class U, class T, class R, class F>
+template <typename U, typename T, typename R, typename F>
 Sparse<U>
 binmap (const T& x, const Sparse<R>& ys, F fcn)
 {
@@ -244,7 +244,7 @@
 }
 
 // Sparse-scalar
-template <class U, class T, class R, class F>
+template <typename U, typename T, typename R, typename F>
 Sparse<U>
 binmap (const Sparse<T>& xs, const R& y, F fcn)
 {
@@ -275,7 +275,7 @@
 }
 
 // Sparse-Sparse (treats singletons as scalars)
-template <class U, class T, class R, class F>
+template <typename U, typename T, typename R, typename F>
 Sparse<U>
 binmap (const Sparse<T>& xs, const Sparse<R>& ys, F fcn, const char *name)
 {
@@ -354,136 +354,136 @@
 
 // Signature (T, R)
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const Array<R>& ya, U (*fcn) (T, R),
         const char *name)
 { return binmap<U, T, R, U (*) (T, R)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const T& x, const Array<R>& ya, U (*fcn) (T, R))
 { return binmap<U, T, R, U (*) (T, R)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const R& y, U (*fcn) (T, R))
 { return binmap<U, T, R, U (*) (T, R)> (xa, y, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const Sparse<R>& ya, U (*fcn) (T, R),
         const char *name)
 { return binmap<U, T, R, U (*) (T, R)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const T& x, const Sparse<R>& ya, U (*fcn) (T, R))
 { return binmap<U, T, R, U (*) (T, R)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const R& y, U (*fcn) (T, R))
 { return binmap<U, T, R, U (*) (T, R)> (xa, y, fcn); }
 
 // Signature (const T&, const R&)
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const Array<R>& ya, U (*fcn) (const T&, const R&),
         const char *name)
 { return binmap<U, T, R, U (*) (const T&, const R&)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const T& x, const Array<R>& ya, U (*fcn) (const T&, const R&))
 { return binmap<U, T, R, U (*) (const T&, const R&)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const R& y, U (*fcn) (const T&, const R&))
 { return binmap<U, T, R, U (*) (const T&, const R&)> (xa, y, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const Sparse<R>& ya, U (*fcn) (const T&, const R&),
         const char *name)
 { return binmap<U, T, R, U (*) (const T&, const R&)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const T& x, const Sparse<R>& ya, U (*fcn) (const T&, const R&))
 { return binmap<U, T, R, U (*) (const T&, const R&)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const R& y, U (*fcn) (const T&, const R&))
 { return binmap<U, T, R, U (*) (const T&, const R&)> (xa, y, fcn); }
 
 // Signature (const T&, R)
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const Array<R>& ya, U (*fcn) (const T&, R),
         const char *name)
 { return binmap<U, T, R, U (*) (const T&, R)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const T& x, const Array<R>& ya, U (*fcn) (const T&, R))
 { return binmap<U, T, R, U (*) (const T&, R)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const R& y, U (*fcn) (const T&, R))
 { return binmap<U, T, R, U (*) (const T&, R)> (xa, y, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const Sparse<R>& ya, U (*fcn) (const T&, R),
         const char *name)
 { return binmap<U, T, R, U (*) (const T&, R)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const T& x, const Sparse<R>& ya, U (*fcn) (const T&, R))
 { return binmap<U, T, R, U (*) (const T&, R)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const R& y, U (*fcn) (const T&, R))
 { return binmap<U, T, R, U (*) (const T&, R)> (xa, y, fcn); }
 
 // Signature (T, const R&)
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const Array<R>& ya, U (*fcn) (T, const R&),
         const char *name)
 { return binmap<U, T, R, U (*) (T, const R&)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const T& x, const Array<R>& ya, U (*fcn) (T, const R&))
 { return binmap<U, T, R, U (*) (T, const R&)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Array<U>
 binmap (const Array<T>& xa, const R& y, U (*fcn) (T, const R&))
 { return binmap<U, T, R, U (*) (T, const R&)> (xa, y, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const Sparse<R>& ya, U (*fcn) (T, const R&),
         const char *name)
 { return binmap<U, T, R, U (*) (T, const R&)> (xa, ya, fcn, name); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const T& x, const Sparse<R>& ya, U (*fcn) (T, const R&))
 { return binmap<U, T, R, U (*) (T, const R&)> (x, ya, fcn); }
 
-template <class U, class T, class R>
+template <typename U, typename T, typename R>
 inline Sparse<U>
 binmap (const Sparse<T>& xa, const R& y, U (*fcn) (T, const R&))
 { return binmap<U, T, R, U (*) (T, const R&)> (xa, y, fcn); }
--- a/liboctave/util/oct-cmplx.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-cmplx.h	Sun Jan 24 13:50:04 2016 -0500
@@ -41,7 +41,7 @@
 // cut.  Change this to principal value (-pi,pi] by mapping -pi to pi.
 
 #define DEF_COMPLEXR_COMP(OP, OPS) \
-template <class T> \
+template <typename T> \
 inline bool operator OP (const std::complex<T>& a, const std::complex<T>& b) \
 { \
   FLOAT_TRUNCATE const T ax = std::abs (a); \
@@ -64,7 +64,7 @@
   else \
     return ax OPS bx; \
 } \
-template <class T> \
+template <typename T> \
 inline bool operator OP (const std::complex<T>& a, T b) \
 { \
   FLOAT_TRUNCATE const T ax = std::abs (a); \
@@ -79,7 +79,7 @@
   else \
     return ax OPS bx; \
 } \
-template <class T> \
+template <typename T> \
 inline bool operator OP (T a, const std::complex<T>& b) \
 { \
   FLOAT_TRUNCATE const T ax = std::abs (a); \
--- a/liboctave/util/oct-inttypes.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-inttypes.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -31,10 +31,10 @@
 
 #include "oct-inttypes.h"
 
-template<class T>
+template <typename T>
 const octave_int<T> octave_int<T>::zero (static_cast<T> (0));
 
-template<class T>
+template <typename T>
 const octave_int<T> octave_int<T>::one (static_cast<T> (1));
 
 // define type names.
@@ -57,7 +57,7 @@
 #ifdef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED
 
 #define DEFINE_OCTAVE_LONG_DOUBLE_CMP_OP_TEMPLATES(T) \
-  template <class xop> \
+  template <typename xop> \
   bool \
   octave_int_cmp_op::external_mop (double x, T y) \
   { \
@@ -73,7 +73,7 @@
      return retval; \
   } \
    \
-  template <class xop> \
+  template <typename xop> \
   bool \
   octave_int_cmp_op::external_mop (T x, double y) \
   { \
@@ -189,7 +189,7 @@
 
 // Define comparison operators
 
-template <class xop>
+template <typename xop>
 bool
 octave_int_cmp_op::emulate_mop (uint64_t x, double y)
 {
@@ -209,7 +209,7 @@
     }
 }
 
-template <class xop>
+template <typename xop>
 bool
 octave_int_cmp_op::emulate_mop (int64_t x, double y)
 {
@@ -236,7 +236,7 @@
 // We define double-int operations by reverting the operator
 
 // A trait class reverting the operator
-template <class xop>
+template <typename xop>
 class rev_op
 {
 public:
@@ -256,7 +256,7 @@
 DEFINE_REVERTED_OPERATOR(le,ge);
 DEFINE_REVERTED_OPERATOR(ge,le);
 
-template <class xop>
+template <typename xop>
 bool
 octave_int_cmp_op::emulate_mop (double x, uint64_t y)
 {
@@ -264,7 +264,7 @@
   return mop<rop> (y, x);
 }
 
-template <class xop>
+template <typename xop>
 bool
 octave_int_cmp_op::emulate_mop (double x, int64_t y)
 {
@@ -663,14 +663,7 @@
 
 #endif
 
-//template <class T>
-//bool
-//xisnan (const octave_int<T>&)
-//{
-//  return false;
-//}
-
-template <class T>
+template <typename T>
 octave_int<T>
 pow (const octave_int<T>& a, const octave_int<T>& b)
 {
@@ -712,12 +705,12 @@
   return retval;
 }
 
-template <class T>
+template <typename T>
 octave_int<T>
 pow (const double& a, const octave_int<T>& b)
 { return octave_int<T> (pow (a, b.double_value ())); }
 
-template <class T>
+template <typename T>
 octave_int<T>
 pow (const octave_int<T>& a, const double& b)
 {
@@ -726,12 +719,12 @@
           : octave_int<T> (pow (a.double_value (), b)));
 }
 
-template <class T>
+template <typename T>
 octave_int<T>
 pow (const float& a, const octave_int<T>& b)
 { return octave_int<T> (pow (a, b.float_value ())); }
 
-template <class T>
+template <typename T>
 octave_int<T>
 pow (const octave_int<T>& a, const float& b)
 {
@@ -743,12 +736,12 @@
 // FIXME: Do we really need a differently named single-precision
 //        function integer power function here instead of an overloaded
 //        one?
-template <class T>
+template <typename T>
 octave_int<T>
 powf (const float& a, const octave_int<T>& b)
 { return octave_int<T> (pow (a, b.float_value ())); }
 
-template <class T>
+template <typename T>
 octave_int<T>
 powf (const octave_int<T>& a, const float& b)
 {
--- a/liboctave/util/oct-inttypes.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-inttypes.h	Sun Jan 24 13:50:04 2016 -0500
@@ -42,11 +42,11 @@
 // FIXME: we define this by our own because some compilers, such as
 // MSVC, do not provide std::abs (int64_t) and std::abs (uint64_t).  In
 // the future, it should go away in favor of std::abs.
-template <class T>
+template <typename T>
 inline T octave_int_abs (T x) { return x >= 0 ? x : -x; }
 
 // Query for an integer type of certain sizeof, and signedness.
-template<int qsize, bool qsigned>
+template <int qsize, bool qsigned>
 struct query_integer_type
 {
 public:
@@ -83,7 +83,7 @@
     public: \
       static const bool ltval = (0 OP 1); \
       static const bool gtval = (1 OP 0); \
-      template <class T> \
+      template <typename T> \
       static bool op (T x, T y) { return x OP y; } \
     }
 
@@ -95,7 +95,7 @@
     public: \
       static const bool ltval = value; \
       static const bool gtval = value; \
-      template <class T> \
+      template <typename T> \
       static bool op (T, T) { return value; } \
     }
 
@@ -107,7 +107,7 @@
   // the signedness of T1 is preserved and it is widened if T2 is wider.
   // Notice that if this is applied to both types, they must end up with equal
   // size.
-  template <class T1, class T2>
+  template <typename T1, typename T2>
   class prom
   {
     // Promote to int?
@@ -126,7 +126,7 @@
 
   // Implements comparisons between two types of equal size but
   // possibly different signedness.
-  template<class xop, int size>
+  template <typename xop, int size>
   class uiop
   {
     typedef typename query_integer_type<size, false>::type utype;
@@ -153,7 +153,7 @@
   REGISTER_OCTAVE_CONST_OP (cf, false);
 
   // Universal comparison operation.
-  template<class xop, class T1, class T2>
+  template <typename xop, typename T1, typename T2>
   static bool
   op (T1 x, T2 y)
   {
@@ -166,21 +166,21 @@
 public:
 
   // Mixed comparisons
-  template <class xop, class T>
+  template <typename xop, typename T>
   static bool
   mop (T x, double y)
   { return xop::op (static_cast<double> (x), y); }
 
-  template <class xop, class T>
+  template <typename xop, typename T>
   static bool
   mop (double x, T y)
   { return xop::op (x, static_cast<double> (y)); }
 
 #ifdef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED
 #define DECLARE_EXTERNAL_LONG_DOUBLE_CMP_OPS(T) \
-  template <class xop> static OCTAVE_API bool \
+  template <typename xop> static OCTAVE_API bool \
   external_mop (double, T); \
-  template <class xop> static OCTAVE_API bool \
+  template <typename xop> static OCTAVE_API bool \
   external_mop (T, double)
 
   DECLARE_EXTERNAL_LONG_DOUBLE_CMP_OPS (int64_t);
@@ -193,13 +193,13 @@
 #ifdef OCTAVE_INT_USE_LONG_DOUBLE
 #ifdef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED
 #define DEFINE_LONG_DOUBLE_CMP_OP(T) \
-  template <class xop> \
+  template <typename xop> \
   static bool \
   mop (double x, T y) \
   { \
     return external_mop<xop> (x, y); \
   } \
-  template <class xop> \
+  template <typename xop> \
   static bool \
   mop (T x, double y) \
   { \
@@ -207,14 +207,14 @@
   }
 #else
 #define DEFINE_LONG_DOUBLE_CMP_OP(T) \
-  template <class xop> \
+  template <typename xop> \
   static bool \
   mop (double x, T y) \
   { \
     return xop::op (static_cast<long double> (x), \
                     static_cast<long double> (y)); \
   } \
-  template <class xop> \
+  template <typename xop> \
   static bool \
   mop (T x, double y) \
   { \
@@ -229,17 +229,17 @@
   // but we can't do this because bugs in gcc (<= 4.3) prevent
   // explicit instantiations later in that case.
 #define DEFINE_LONG_DOUBLE_CMP_OP(T) \
-  template <class xop> static OCTAVE_API bool \
+  template <typename xop> static OCTAVE_API bool \
   emulate_mop (double, T); \
-  template <class xop> \
+  template <typename xop> \
   static bool \
   mop (double x, T y) \
     { \
       return emulate_mop<xop> (x, y); \
     } \
-  template <class xop> static OCTAVE_API bool \
+  template <typename xop> static OCTAVE_API bool \
   emulate_mop (T, double); \
-  template <class xop> \
+  template <typename xop> \
   static bool \
   mop (T x, double y) \
     { \
@@ -254,7 +254,7 @@
 };
 
 // Base integer class. No data, just conversion methods and exception flags.
-template <class T>
+template <typename T>
 class octave_int_base
 {
 public:
@@ -263,7 +263,7 @@
   static T max_val () { return std::numeric_limits<T>:: max (); }
 
   // Convert integer value.
-  template <class S>
+  template <typename S>
   static T
   truncate_int (const S& value)
   {
@@ -302,7 +302,7 @@
 private:
 
   // Computes a real-valued threshold for a max/min check.
-  template <class S>
+  template <typename S>
   static S
   compute_threshold (S val, T orig_val)
   {
@@ -316,7 +316,7 @@
 
 public:
   // Convert a real number (check NaN and non-int).
-  template <class S>
+  template <typename S>
   static T
   convert_real (const S& value)
   {
@@ -350,13 +350,13 @@
 // and completely specialize. Arithmetics inherits from octave_int_base so that
 // it can use its exceptions and truncation functions.
 
-template <class T, bool is_signed>
+template <typename T, bool is_signed>
 class octave_int_arith_base
 { };
 
 // Unsigned arithmetics. C++ standard requires it to be modular, so the
 // overflows can be handled efficiently and reliably.
-template <class T>
+template <typename T>
 class octave_int_arith_base<T, false> : octave_int_base<T>
 {
 public:
@@ -517,7 +517,7 @@
 // Otherwise, we fall back to a bullet-proof code that only uses assumptions
 // guaranteed by the standard.
 
-template <class T>
+template <typename T>
 class octave_int_arith_base<T, true> : octave_int_base<T>
 {
   // The corresponding unsigned type.
@@ -821,12 +821,12 @@
 #endif
 
 // This class simply selects the proper arithmetics.
-template<class T>
+template <typename T>
 class octave_int_arith
  : public octave_int_arith_base<T, std::numeric_limits<T>::is_signed>
 { };
 
-template <class T>
+template <typename T>
 class
 octave_int : public octave_int_base<T>
 {
@@ -852,10 +852,10 @@
 
   octave_int (bool b) : ival (b) { }
 
-  template <class U>
+  template <typename U>
   octave_int (const U& i) : ival(octave_int_base<T>::truncate_int (i)) { }
 
-  template <class U>
+  template <typename U>
   octave_int (const octave_int<U>& i)
     : ival (octave_int_base<T>::truncate_int (i.value ())) { }
 
@@ -949,60 +949,60 @@
   T ival;
 };
 
-template <class T>
+template <typename T>
 inline octave_int<T>
 rem (const octave_int<T>& x, const octave_int<T>& y)
 { return octave_int_arith<T>::rem (x.value (), y.value ()); }
 
-template <class T>
+template <typename T>
 inline octave_int<T>
 mod (const octave_int<T>& x, const octave_int<T>& y)
 { return octave_int_arith<T>::mod (x.value (), y.value ()); }
 
 // No mixed integer binary operations!
 
-template <class T>
+template <typename T>
 inline bool
 xisnan (const octave_int<T>&)
 { return false; }
 
 // FIXME: can/should any of these be inline?
 
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 pow (const octave_int<T>&, const octave_int<T>&);
 
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 pow (const double& a, const octave_int<T>& b);
 
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 pow (const octave_int<T>& a, const double& b);
 
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 pow (const float& a, const octave_int<T>& b);
 
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 pow (const octave_int<T>& a, const float& b);
 
 // FIXME: Do we really need a differently named single-precision
 //        function integer power function here instead of an overloaded
 //        one?
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 powf (const float& a, const octave_int<T>& b);
 
-template <class T>
+template <typename T>
 extern OCTAVE_API octave_int<T>
 powf (const octave_int<T>& a, const float& b);
 
 // Binary relations
 
 #define OCTAVE_INT_CMP_OP(OP, NAME) \
-  template<class T1, class T2> \
+  template <typename T1, typename T2> \
   inline bool \
   operator OP (const octave_int<T1>& x, const octave_int<T2>& y) \
   { return octave_int_cmp_op::op<octave_int_cmp_op::NAME, T1, T2> \
@@ -1017,7 +1017,7 @@
 
 #undef OCTAVE_INT_CMP_OP
 
-template <class T>
+template <typename T>
 inline std::ostream&
 operator << (std::ostream& os, const octave_int<T>& ival)
 {
@@ -1025,7 +1025,7 @@
   return os;
 }
 
-template <class T>
+template <typename T>
 inline std::istream&
 operator >> (std::istream& is, octave_int<T>& ival)
 {
@@ -1082,7 +1082,7 @@
 // Bitwise operations
 
 #define OCTAVE_INT_BITCMP_OP(OP) \
-  template <class T> \
+  template <typename T> \
   octave_int<T> \
   operator OP (const octave_int<T>& x, const octave_int<T>& y) \
   { return x.value () OP y.value (); }
@@ -1094,7 +1094,7 @@
 #undef OCTAVE_INT_BITCMP_OP
 
 // General bit shift.
-template <class T>
+template <typename T>
 octave_int<T>
 bitshift (const octave_int<T>& a, int n,
           const octave_int<T>& mask = std::numeric_limits<T>::max ())
@@ -1137,11 +1137,11 @@
 #endif
 
 #define OCTAVE_INT_DOUBLE_BIN_OP0(OP) \
-  template <class T> \
+  template <typename T> \
   inline octave_int<T> \
   operator OP (const octave_int<T>& x, const double& y) \
   { return octave_int<T> (static_cast<double> (x) OP y); } \
-  template <class T> \
+  template <typename T> \
   inline octave_int<T> \
   operator OP (const double& x, const octave_int<T>& y) \
   { return octave_int<T> (x OP static_cast<double> (y)); }
@@ -1233,11 +1233,11 @@
 #undef DECLARE_EXTERNAL_LONG_DOUBLE_OPS
 
 #define OCTAVE_INT_DOUBLE_CMP_OP(OP,NAME) \
-  template <class T> \
+  template <typename T> \
   inline bool \
   operator OP (const octave_int<T>& x, const double& y) \
   { return octave_int_cmp_op::mop<octave_int_cmp_op::NAME> (x.value (), y); } \
-  template <class T> \
+  template <typename T> \
   inline bool \
   operator OP (const double& x, const octave_int<T>& y) \
   { return octave_int_cmp_op::mop<octave_int_cmp_op::NAME> (x, y.value ()); }
@@ -1254,11 +1254,11 @@
 // Floats are handled by simply converting to doubles.
 
 #define OCTAVE_INT_FLOAT_BIN_OP(OP) \
-  template <class T> \
+  template <typename T> \
   inline octave_int<T> \
   operator OP (const octave_int<T>& x, float y) \
   { return x OP static_cast<double> (y); } \
-  template <class T> \
+  template <typename T> \
   inline octave_int<T> \
   operator OP (float x, const octave_int<T>& y) \
   { return static_cast<double> (x) OP y; }
@@ -1271,11 +1271,11 @@
 #undef OCTAVE_INT_FLOAT_BIN_OP
 
 #define OCTAVE_INT_FLOAT_CMP_OP(OP) \
-  template <class T> \
+  template <typename T> \
   inline bool \
   operator OP (const octave_int<T>& x, const float& y) \
   { return x OP static_cast<double> (y); } \
-  template <class T> \
+  template <typename T> \
   bool \
   operator OP (const float& x, const octave_int<T>& y) \
   { return static_cast<double> (x) OP y; }
@@ -1289,7 +1289,7 @@
 
 #undef OCTAVE_INT_FLOAT_CMP_OP
 
-template <class T>
+template <typename T>
 octave_int<T>
 xmax (const octave_int<T>& x, const octave_int<T>& y)
 {
@@ -1298,7 +1298,7 @@
   return octave_int<T> (xv >= yv ? xv : yv);
 }
 
-template <class T>
+template <typename T>
 octave_int<T>
 xmin (const octave_int<T>& x, const octave_int<T>& y)
 {
--- a/liboctave/util/oct-locbuf.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-locbuf.h	Sun Jan 24 13:50:04 2016 -0500
@@ -30,7 +30,7 @@
 // that gets deleted automatically.  For common POD types, we provide
 // specializations.
 
-template <class T>
+template <typename T>
 class octave_local_buffer
 {
 public:
@@ -137,7 +137,7 @@
 // MORE ?
 
 // All pointers and const pointers are also POD types.
-template <class T>
+template <typename T>
 class octave_local_buffer<T *> : private octave_chunk_buffer
 {
 public:
@@ -148,7 +148,7 @@
   operator T **() const { return reinterpret_cast<T **> (this->data ()); }
 };
 
-template <class T>
+template <typename T>
 class octave_local_buffer<const T *> : private octave_chunk_buffer
 {
 public:
--- a/liboctave/util/oct-refcount.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-refcount.h	Sun Jan 24 13:50:04 2016 -0500
@@ -49,7 +49,7 @@
 #endif
 
 // Encapsulates a reference counter.
-template <class T>
+template <typename T>
 class octave_refcount
 {
 public:
--- a/liboctave/util/oct-sort.cc	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-sort.cc	Sun Jan 24 13:50:04 2016 -0500
@@ -116,25 +116,25 @@
 #include "oct-sort.h"
 #include "oct-locbuf.h"
 
-template <class T>
+template <typename T>
 octave_sort<T>::octave_sort (void) :
   compare (ascending_compare), ms (0)
 {
 }
 
-template <class T>
+template <typename T>
 octave_sort<T>::octave_sort (compare_fcn_type comp)
   : compare (comp), ms (0)
 {
 }
 
-template <class T>
+template <typename T>
 octave_sort<T>::~octave_sort ()
 {
   delete ms;
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::set_compare (sortmode mode)
 {
@@ -146,8 +146,8 @@
     compare = 0;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::binarysort (T *data, octave_idx_type nel,
                             octave_idx_type start, Comp comp)
@@ -191,8 +191,8 @@
   return;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::binarysort (T *data, octave_idx_type *idx, octave_idx_type nel,
                             octave_idx_type start, Comp comp)
@@ -258,8 +258,8 @@
 
 Returns -1 in case of error.
 */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 octave_idx_type
 octave_sort<T>::count_run (T *lo, octave_idx_type nel, bool& descending,
                            Comp comp)
@@ -318,8 +318,8 @@
 
 Returns -1 on error.  See listsort.txt for info on the method.
 */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 octave_idx_type
 octave_sort<T>::gallop_left (T key, T *a, octave_idx_type n,
                              octave_idx_type hint,
@@ -413,8 +413,8 @@
 we're sticking to "<" comparisons that it's much harder to follow if
 written as one routine with yet another "left or right?" flag.
 */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 octave_idx_type
 octave_sort<T>::gallop_right (T key, T *a, octave_idx_type n,
                               octave_idx_type hint,
@@ -534,7 +534,7 @@
 /* Ensure enough temp memory for 'need' array slots is available.
  * Returns 0 on success and -1 if the memory can't be gotten.
  */
-template <class T>
+template <typename T>
 void
 octave_sort<T>::MergeState::getmem (octave_idx_type need)
 {
@@ -552,7 +552,7 @@
 
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::MergeState::getmemi (octave_idx_type need)
 {
@@ -577,8 +577,8 @@
  * merge, and should have na <= nb.  See listsort.txt for more info.
  * Return 0 if successful, -1 if error.
  */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_lo (T *pa, octave_idx_type na,
                           T *pb, octave_idx_type nb,
@@ -712,8 +712,8 @@
   return 0;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_lo (T *pa, octave_idx_type *ipa, octave_idx_type na,
                           T *pb, octave_idx_type *ipb, octave_idx_type nb,
@@ -859,8 +859,8 @@
  * merge, and should have na >= nb.  See listsort.txt for more info.
  * Return 0 if successful, -1 if error.
  */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_hi (T *pa, octave_idx_type na,
                           T *pb, octave_idx_type nb,
@@ -996,8 +996,8 @@
   return 0;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_hi (T *pa, octave_idx_type *ipa, octave_idx_type na,
                           T *pb, octave_idx_type *ipb, octave_idx_type nb,
@@ -1146,8 +1146,8 @@
 /* Merge the two runs at stack indices i and i+1.
  * Returns 0 on success, -1 on error.
  */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_at (octave_idx_type i, T *data,
                           Comp comp)
@@ -1197,8 +1197,8 @@
     return merge_hi (pa, na, pb, nb, comp);
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_at (octave_idx_type i, T *data, octave_idx_type *idx,
                           Comp comp)
@@ -1261,8 +1261,8 @@
  *
  * Returns 0 on success, -1 on error.
  */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_collapse (T *data, Comp comp)
 {
@@ -1290,8 +1290,8 @@
   return 0;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_collapse (T *data, octave_idx_type *idx, Comp comp)
 {
@@ -1324,8 +1324,8 @@
  *
  * Returns 0 on success, -1 on error.
  */
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_force_collapse (T *data, Comp comp)
 {
@@ -1343,8 +1343,8 @@
   return 0;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 int
 octave_sort<T>::merge_force_collapse (T *data, octave_idx_type *idx, Comp comp)
 {
@@ -1372,7 +1372,7 @@
  *
  * See listsort.txt for more info.
  */
-template <class T>
+template <typename T>
 octave_idx_type
 octave_sort<T>::merge_compute_minrun (octave_idx_type n)
 {
@@ -1387,8 +1387,8 @@
   return n + r;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::sort (T *data, octave_idx_type nel, Comp comp)
 {
@@ -1446,8 +1446,8 @@
   return;
 }
 
-template <class T>
-template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::sort (T *data, octave_idx_type *idx, octave_idx_type nel,
                       Comp comp)
@@ -1509,7 +1509,7 @@
   return;
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::sort (T *data, octave_idx_type nel)
 {
@@ -1527,7 +1527,7 @@
         sort (data, nel, compare);
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::sort (T *data, octave_idx_type *idx, octave_idx_type nel)
 {
@@ -1545,7 +1545,8 @@
         sort (data, idx, nel, compare);
 }
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 bool
 octave_sort<T>::is_sorted (const T *data, octave_idx_type nel, Comp comp)
 {
@@ -1565,7 +1566,7 @@
   return data == end;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_sort<T>::is_sorted (const T *data, octave_idx_type nel)
 {
@@ -1595,7 +1596,8 @@
 };
 
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::sort_rows (const T *data, octave_idx_type *idx,
                            octave_idx_type rows, octave_idx_type cols,
@@ -1653,7 +1655,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::sort_rows (const T *data, octave_idx_type *idx,
                            octave_idx_type rows, octave_idx_type cols)
@@ -1672,7 +1674,8 @@
         sort_rows (data, idx, rows, cols, compare);
 }
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 bool
 octave_sort<T>::is_sorted_rows (const T *data, octave_idx_type rows,
                                 octave_idx_type cols, Comp comp)
@@ -1729,7 +1732,7 @@
   return sorted;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_sort<T>::is_sorted_rows (const T *data, octave_idx_type rows,
                                 octave_idx_type cols)
@@ -1754,7 +1757,8 @@
 
 // The simple binary lookup.
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 octave_idx_type
 octave_sort<T>::lookup (const T *data, octave_idx_type nel,
                         const T& value, Comp comp)
@@ -1774,7 +1778,7 @@
   return lo;
 }
 
-template <class T>
+template <typename T>
 octave_idx_type
 octave_sort<T>::lookup (const T *data, octave_idx_type nel,
                         const T& value)
@@ -1797,7 +1801,8 @@
   return retval;
 }
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::lookup (const T *data, octave_idx_type nel,
                         const T *values, octave_idx_type nvalues,
@@ -1810,7 +1815,7 @@
     idx[j] = lookup (data, nel, values[j], comp);
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::lookup (const T *data, octave_idx_type nel,
                         const T* values, octave_idx_type nvalues,
@@ -1830,7 +1835,8 @@
         lookup (data, nel, values, nvalues, idx, std::ptr_fun (compare));
 }
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::lookup_sorted (const T *data, octave_idx_type nel,
                                const T *values, octave_idx_type nvalues,
@@ -1884,7 +1890,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::lookup_sorted (const T *data, octave_idx_type nel,
                                const T* values, octave_idx_type nvalues,
@@ -1905,7 +1911,8 @@
                        std::ptr_fun (compare));
 }
 
-template <class T> template <class Comp>
+template <typename T>
+template <typename Comp>
 void
 octave_sort<T>::nth_element (T *data, octave_idx_type nel,
                              octave_idx_type lo, octave_idx_type up,
@@ -1931,7 +1938,7 @@
     }
 }
 
-template <class T>
+template <typename T>
 void
 octave_sort<T>::nth_element (T *data, octave_idx_type nel,
                              octave_idx_type lo, octave_idx_type up)
@@ -1952,7 +1959,7 @@
         nth_element (data, nel, lo, up, std::ptr_fun (compare));
 }
 
-template <class T>
+template <typename T>
 bool
 octave_sort<T>::ascending_compare (typename ref_param<T>::type x,
                                    typename ref_param<T>::type y)
@@ -1960,7 +1967,7 @@
   return x < y;
 }
 
-template <class T>
+template <typename T>
 bool
 octave_sort<T>::descending_compare (typename ref_param<T>::type x,
                                     typename ref_param<T>::type y)
--- a/liboctave/util/oct-sort.h	Sun Jan 24 10:11:43 2016 -0800
+++ b/liboctave/util/oct-sort.h	Sun Jan 24 13:50:04 2016 -0500
@@ -102,7 +102,7 @@
 // Enum for type of sort function
 enum sortmode { UNSORTED = 0, ASCENDING, DESCENDING };
 
-template <class T>
+template <typename T>
 class
 octave_sort
 {
@@ -231,99 +231,99 @@
   MergeState *ms;
 
 
-  template <class Comp>
+  template <typename Comp>
   void binarysort (T *data, octave_idx_type nel,
                    octave_idx_type start, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   void binarysort (T *data, octave_idx_type *idx, octave_idx_type nel,
                    octave_idx_type start, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   octave_idx_type count_run (T *lo, octave_idx_type n, bool& descending,
                              Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   octave_idx_type gallop_left (T key, T *a, octave_idx_type n,
                                octave_idx_type hint, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   octave_idx_type gallop_right (T key, T *a, octave_idx_type n,
                                 octave_idx_type hint, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_lo (T *pa, octave_idx_type na,
                 T *pb, octave_idx_type nb,
                 Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_lo (T *pa, octave_idx_type *ipa, octave_idx_type na,
                 T *pb, octave_idx_type *ipb, octave_idx_type nb,
                 Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_hi (T *pa, octave_idx_type na,
                 T *pb, octave_idx_type nb,
                 Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_hi (T *pa, octave_idx_type *ipa, octave_idx_type na,
                 T *pb, octave_idx_type *ipb, octave_idx_type nb,
                 Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_at (octave_idx_type i, T *data, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_at (octave_idx_type i, T *data, octave_idx_type *idx, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_collapse (T *data, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_collapse (T *data, octave_idx_type *idx, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_force_collapse (T *data, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   int merge_force_collapse (T *data, octave_idx_type *idx, Comp comp);
 
   octave_idx_type merge_compute_minrun (octave_idx_type n);
 
-  template <class Comp>
+  template <typename Comp>
   void sort (T *data, octave_idx_type nel, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   void sort (T *data, octave_idx_type *idx, octave_idx_type nel, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   bool is_sorted (const T *data, octave_idx_type nel, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   void sort_rows (const T *data, octave_idx_type *idx,
                   octave_idx_type rows, octave_idx_type cols,
                   Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   bool is_sorted_rows (const T *data, octave_idx_type rows,
                        octave_idx_type cols, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   octave_idx_type lookup (const T *data, octave_idx_type nel,
                           const T& value, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   void lookup (const T *data, octave_idx_type nel,
                const T* values, octave_idx_type nvalues,
                octave_idx_type *idx, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   void lookup_sorted (const T *data, octave_idx_type nel,
                       const T* values, octave_idx_type nvalues,
                       octave_idx_type *idx, bool rev, Comp comp);
 
-  template <class Comp>
+  template <typename Comp>
   void nth_element (T *data, octave_idx_type nel,
                     octave_idx_type lo, octave_idx_type up,
                     Comp comp);
@@ -335,7 +335,7 @@
   octave_sort& operator = (const octave_sort&);
 };
 
-template <class T>
+template <typename T>
 class
 vec_index
 {