Mercurial > octave
changeset 23534:b6498c088fca
maint: Don't write '> >' for declaration of templates that use templates.
C++11 parser allows more readable "template1<template2<TYPENAME>>" syntax
rather than "template1<template2<TYPENAME> >".
* cellfun.cc, data.cc, oct-stream.cc, octave-link.h, pr-output.cc, sqrtm.cc,
symtab.cc, symtab.h, tril.cc, ov-cell.h, ov-classdef.cc, ov-classdef.h,
ov-intx.h, ov.cc, bp-table.h, jit-typeinfo.h, jit-util.h, pt-jit.h,
CColVector.cc, CMatrix.cc, CNDArray.cc, CRowVector.cc, MatrixType.cc,
Sparse.cc, fCColVector.cc, fCMatrix.cc, fCNDArray.cc, fCRowVector.cc,
idx-vector.h, lo-traits.h: Replace '> >' with '>>' for double templates.
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/cellfun.cc Sat May 27 09:59:32 2017 -0700 @@ -1972,7 +1972,7 @@ } OCTAVE_LOCAL_BUFFER_INIT (octave_idx_type, ridx, nd, 0); - NoAlias< Array<idx_vector> > ra_idx + NoAlias< Array<idx_vector>> ra_idx (dim_vector (1, std::max (nd, a.ndims ())), idx_vector::colon); for (octave_idx_type j = 0; j < retval.numel (); j++)
--- a/libinterp/corefcn/data.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/data.cc Sat May 27 09:59:32 2017 -0700 @@ -7677,7 +7677,7 @@ octave_value x = args(0); - NoAlias< Array<octave_idx_type> > r (rm.dims ()); + NoAlias< Array<octave_idx_type>> r (rm.dims ()); for (octave_idx_type i = 0; i < rm.numel (); i++) {
--- a/libinterp/corefcn/oct-stream.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/oct-stream.cc Sat May 27 09:59:32 2017 -0700 @@ -6725,7 +6725,7 @@ }; template <typename T> -class ultimate_element_type<octave_int<T> > +class ultimate_element_type<octave_int<T>> { public: typedef T type;
--- a/libinterp/corefcn/octave-link.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/octave-link.h Sat May 27 09:59:32 2017 -0700 @@ -195,7 +195,7 @@ : std::list<std::string> (); } - typedef std::list<std::pair<std::string, std::string> > filter_list; + typedef std::list<std::pair<std::string, std::string>> filter_list; static std::list<std::string> file_dialog (const filter_list& filter, const std::string& title,
--- a/libinterp/corefcn/pr-output.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/pr-output.cc Sat May 27 09:59:32 2017 -0700 @@ -3104,7 +3104,7 @@ else { if (free_format) - os << typename octave_print_conv<octave_int<T> >::print_conv_type (val); + os << typename octave_print_conv<octave_int<T>>::print_conv_type (val); else pr_int (os, val); }
--- a/libinterp/corefcn/sqrtm.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/sqrtm.cc Sat May 27 09:59:32 2017 -0700 @@ -234,10 +234,10 @@ retval(0) = arg.sqrt (); else if (arg.is_single_type ()) retval(0) = do_sqrtm<FloatMatrix, FloatComplexMatrix, - octave::math::schur<FloatComplexMatrix> > (arg); + octave::math::schur<FloatComplexMatrix>> (arg); else if (arg.is_numeric_type ()) retval(0) = do_sqrtm<Matrix, ComplexMatrix, - octave::math::schur<ComplexMatrix> > (arg); + octave::math::schur<ComplexMatrix>> (arg); if (nargout > 1) {
--- a/libinterp/corefcn/symtab.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/symtab.cc Sat May 27 09:59:32 2017 -0700 @@ -61,10 +61,10 @@ std::map<std::string, symbol_table::fcn_info> symbol_table::fcn_table; -std::map<std::string, std::set<std::string> > +std::map<std::string, std::set<std::string>> symbol_table::class_precedence_table; -std::map<std::string, std::list<std::string> > symbol_table::parent_map; +std::map<std::string, std::list<std::string>> symbol_table::parent_map; const symbol_table::scope_id symbol_table::xglobal_scope = 0; const symbol_table::scope_id symbol_table::xtop_scope = 1;
--- a/libinterp/corefcn/symtab.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/symtab.h Sat May 27 09:59:32 2017 -0700 @@ -2321,19 +2321,19 @@ // Mape from class names to set of classes that have lower // precedence. - static std::map<std::string, std::set<std::string> > class_precedence_table; - - typedef std::map<std::string, std::set<std::string> >::const_iterator + static std::map<std::string, std::set<std::string>> class_precedence_table; + + typedef std::map<std::string, std::set<std::string>>::const_iterator class_precedence_table_const_iterator; - typedef std::map<std::string, std::set<std::string> >::iterator + typedef std::map<std::string, std::set<std::string>>::iterator class_precedence_table_iterator; // Map from class names to parent class names. - static std::map<std::string, std::list<std::string> > parent_map; - - typedef std::map<std::string, std::list<std::string> >::const_iterator + static std::map<std::string, std::list<std::string>> parent_map; + + typedef std::map<std::string, std::list<std::string>>::const_iterator const_parent_map_iterator; - typedef std::map<std::string, std::list<std::string> >::iterator + typedef std::map<std::string, std::list<std::string>>::iterator parent_map_iterator; static const scope_id xglobal_scope;
--- a/libinterp/corefcn/tril.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/corefcn/tril.cc Sat May 27 09:59:32 2017 -0700 @@ -108,7 +108,7 @@ } else { - NoAlias<Array<T> > r (a.dims ()); + NoAlias<Array<T>> r (a.dims ()); T *rvec = r.fortran_vec (); for (octave_idx_type j = 0; j < nc; j++) {
--- a/libinterp/octave-value/ov-cell.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/octave-value/ov-cell.h Sat May 27 09:59:32 2017 -0700 @@ -174,7 +174,7 @@ void clear_cellstr_cache (void) const { cellstr_cache.reset (); } - mutable std::unique_ptr<Array<std::string> > cellstr_cache; + mutable std::unique_ptr<Array<std::string>> cellstr_cache; DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA };
--- a/libinterp/octave-value/ov-classdef.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/octave-value/ov-classdef.cc Sat May 27 09:59:32 2017 -0700 @@ -1709,7 +1709,7 @@ bool cdef_object_scalar::is_partially_constructed_for (const cdef_class& cls) const { - std::map< cdef_class, std::list<cdef_class> >::const_iterator it; + std::map< cdef_class, std::list<cdef_class>>::const_iterator it; if (is_constructed ()) return true;
--- a/libinterp/octave-value/ov-classdef.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/octave-value/ov-classdef.h Sat May 27 09:59:32 2017 -0700 @@ -442,7 +442,7 @@ octave_scalar_map map; // Internal/temporary structure used during object construction - std::map< cdef_class, std::list<cdef_class> > ctor_list; + std::map< cdef_class, std::list<cdef_class>> ctor_list; protected: // Restricted object copying!
--- a/libinterp/octave-value/ov-intx.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/octave-value/ov-intx.h Sat May 27 09:59:32 2017 -0700 @@ -50,18 +50,18 @@ class OCTINTERP_API OCTAVE_VALUE_INT_MATRIX_T - : public octave_base_int_matrix<intNDArray<OCTAVE_INT_T> > + : public octave_base_int_matrix<intNDArray<OCTAVE_INT_T>> { public: OCTAVE_VALUE_INT_MATRIX_T (void) - : octave_base_int_matrix<intNDArray<OCTAVE_INT_T> > () { } + : octave_base_int_matrix<intNDArray<OCTAVE_INT_T>> () { } OCTAVE_VALUE_INT_MATRIX_T (const intNDArray<OCTAVE_INT_T>& nda) - : octave_base_int_matrix<intNDArray<OCTAVE_INT_T> > (nda) { } + : octave_base_int_matrix<intNDArray<OCTAVE_INT_T>> (nda) { } OCTAVE_VALUE_INT_MATRIX_T (const Array<OCTAVE_INT_T>& nda) - : octave_base_int_matrix<intNDArray<OCTAVE_INT_T> > + : octave_base_int_matrix<intNDArray<OCTAVE_INT_T>> (intNDArray<OCTAVE_INT_T> (nda)) { } ~OCTAVE_VALUE_INT_MATRIX_T (void) = default;
--- a/libinterp/octave-value/ov.cc Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/octave-value/ov.cc Sat May 27 09:59:32 2017 -0700 @@ -1767,7 +1767,7 @@ template <typename T> static Array<int> -convert_to_int_array (const Array<octave_int<T> >& A) +convert_to_int_array (const Array<octave_int<T>>& A) { Array<int> retval (A.dims ()); octave_idx_type n = A.numel (); @@ -1836,7 +1836,7 @@ template <typename T> static Array<octave_idx_type> -convert_to_octave_idx_type_array (const Array<octave_int<T> >& A) +convert_to_octave_idx_type_array (const Array<octave_int<T>>& A) { Array<octave_idx_type> retval (A.dims ()); octave_idx_type n = A.numel ();
--- a/libinterp/parse-tree/bp-table.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/parse-tree/bp-table.h Sat May 27 09:59:32 2017 -0700 @@ -67,7 +67,7 @@ typedef fname_line_map::const_iterator const_fname_line_map_iterator; typedef fname_line_map::iterator fname_line_map_iterator; - typedef std::map <std::string, std::list<bp_type> > fname_bp_map; + typedef std::map <std::string, std::list<bp_type>> fname_bp_map; typedef fname_bp_map::const_iterator const_fname_bp_map_iterator; typedef fname_bp_map::iterator fname_bp_map_iterator;
--- a/libinterp/parse-tree/jit-typeinfo.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/parse-tree/jit-typeinfo.h Sat May 27 09:59:32 2017 -0700 @@ -380,7 +380,7 @@ mutable generated_map generated; - std::vector<Array<jit_function> > overloads; + std::vector<Array<jit_function>> overloads; std::string mname; };
--- a/libinterp/parse-tree/jit-util.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/parse-tree/jit-util.h Sat May 27 09:59:32 2017 -0700 @@ -73,7 +73,7 @@ template <bool preserveNames, typename T, typename Inserter> class IRBuilder; -typedef IRBuilder<true, ConstantFolder, IRBuilderDefaultInserter<true> > +typedef IRBuilder<true, ConstantFolder, IRBuilderDefaultInserter<true>> IRBuilderD; }
--- a/libinterp/parse-tree/pt-jit.h Thu May 25 13:13:17 2017 -0400 +++ b/libinterp/parse-tree/pt-jit.h Sat May 27 09:59:32 2017 -0700 @@ -163,7 +163,7 @@ void visit_do_until_command (tree_do_until_command&); private: - std::vector<std::pair<std::string, bool> > arguments; + std::vector<std::pair<std::string, bool>> arguments; type_bound_vector bounds; bool converting_function; @@ -260,7 +260,7 @@ const std::vector<jit_type *>& args); // arguments to the llvm::Function for loops - const std::vector<std::pair<std::string, bool> >& get_arguments(void) const + const std::vector<std::pair<std::string, bool>>& get_arguments(void) const { return argument_vec; } #define JIT_METH(clname) \ @@ -273,7 +273,7 @@ // name -> argument index (used for compiling functions) std::map<std::string, int> argument_index; - std::vector<std::pair<std::string, bool> > argument_vec; + std::vector<std::pair<std::string, bool>> argument_vec; // name -> llvm argument (used for compiling loops) std::map<std::string, llvm::Value *> arguments; @@ -445,7 +445,7 @@ jited_function function; llvm::Function *llvm_function; - std::vector<std::pair<std::string, bool> > arguments; + std::vector<std::pair<std::string, bool>> arguments; type_bound_vector bounds; };
--- a/liboctave/array/CColVector.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/CColVector.cc Sat May 27 09:59:32 2017 -0700 @@ -214,7 +214,7 @@ ComplexColumnVector conj (const ComplexColumnVector& a) { - return do_mx_unary_map<Complex, Complex, std::conj<double> > (a); + return do_mx_unary_map<Complex, Complex, std::conj<double>> (a); } // resize is the destructive equivalent for this one
--- a/liboctave/array/CMatrix.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/CMatrix.cc Sat May 27 09:59:32 2017 -0700 @@ -673,7 +673,7 @@ ComplexMatrix conj (const ComplexMatrix& a) { - return do_mx_unary_map<Complex, Complex, std::conj<double> > (a); + return do_mx_unary_map<Complex, Complex, std::conj<double>> (a); } // resize is the destructive equivalent for this one
--- a/liboctave/array/CNDArray.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/CNDArray.cc Sat May 27 09:59:32 2017 -0700 @@ -736,7 +736,7 @@ ComplexNDArray conj (const ComplexNDArray& a) { - return do_mx_unary_map<Complex, Complex, std::conj<double> > (a); + return do_mx_unary_map<Complex, Complex, std::conj<double>> (a); } ComplexNDArray&
--- a/liboctave/array/CRowVector.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/CRowVector.cc Sat May 27 09:59:32 2017 -0700 @@ -203,7 +203,7 @@ ComplexRowVector conj (const ComplexRowVector& a) { - return do_mx_unary_map<Complex, Complex, std::conj<double> > (a); + return do_mx_unary_map<Complex, Complex, std::conj<double>> (a); } // resize is the destructive equivalent for this one
--- a/liboctave/array/MatrixType.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/MatrixType.cc Sat May 27 09:59:32 2017 -0700 @@ -140,7 +140,7 @@ template <typename T> MatrixType::matrix_type -matrix_complex_probe (const MArray<std::complex<T> >& a) +matrix_complex_probe (const MArray<std::complex<T>>& a) { MatrixType::matrix_type typ = MatrixType::Unknown; octave_idx_type nrows = a.rows ();
--- a/liboctave/array/Sparse.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/Sparse.cc Sat May 27 09:59:32 2017 -0700 @@ -1492,7 +1492,7 @@ // Lookup. // FIXME: Could specialize for sorted idx? - NoAlias< Array<octave_idx_type> > lidx (dim_vector (new_nr, new_nc)); + NoAlias< Array<octave_idx_type>> lidx (dim_vector (new_nr, new_nc)); for (octave_idx_type i = 0; i < new_nr*new_nc; i++) lidx(i) = lblookup (ridx (), nz, idxa(i)); @@ -2671,7 +2671,7 @@ Array<T> Sparse<T>::array_value () const { - NoAlias< Array<T> > retval (dims (), T ()); + NoAlias< Array<T>> retval (dims (), T ()); if (rows () == 1) { octave_idx_type i = 0;
--- a/liboctave/array/fCColVector.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/fCColVector.cc Sat May 27 09:59:32 2017 -0700 @@ -216,7 +216,7 @@ FloatComplexColumnVector conj (const FloatComplexColumnVector& a) { - return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float> > (a); + return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float>> (a); } // resize is the destructive equivalent for this one
--- a/liboctave/array/fCMatrix.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/fCMatrix.cc Sat May 27 09:59:32 2017 -0700 @@ -676,7 +676,7 @@ FloatComplexMatrix conj (const FloatComplexMatrix& a) { - return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float> > (a); + return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float>> (a); } // resize is the destructive equivalent for this one
--- a/liboctave/array/fCNDArray.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/fCNDArray.cc Sat May 27 09:59:32 2017 -0700 @@ -742,7 +742,7 @@ FloatComplexNDArray conj (const FloatComplexNDArray& a) { - return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float> > (a); + return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float>> (a); } FloatComplexNDArray&
--- a/liboctave/array/fCRowVector.cc Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/fCRowVector.cc Sat May 27 09:59:32 2017 -0700 @@ -204,7 +204,7 @@ FloatComplexRowVector conj (const FloatComplexRowVector& a) { - return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float> > (a); + return do_mx_unary_map<FloatComplex, FloatComplex, std::conj<float>> (a); } // resize is the destructive equivalent for this one
--- a/liboctave/array/idx-vector.h Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/array/idx-vector.h Sat May 27 09:59:32 2017 -0700 @@ -513,7 +513,7 @@ idx_vector (bool x) : rep (new idx_mask_rep (x)) { chkerr (); } template <typename T> - idx_vector (const Array<octave_int<T> >& nda) : rep (new idx_vector_rep (nda)) + idx_vector (const Array<octave_int<T>>& nda) : rep (new idx_vector_rep (nda)) { chkerr (); } idx_vector (const Array<double>& nda) : rep (new idx_vector_rep (nda))
--- a/liboctave/util/lo-traits.h Thu May 25 13:13:17 2017 -0400 +++ b/liboctave/util/lo-traits.h Sat May 27 09:59:32 2017 -0700 @@ -78,7 +78,7 @@ }; template <template <typename> class Template, typename T> -class is_instance <Template, Template<T> > +class is_instance <Template, Template<T>> { public: @@ -129,7 +129,7 @@ }; template <template <typename> class TemplatedClass, typename T> -class strip_template_param<TemplatedClass, TemplatedClass<T> > +class strip_template_param<TemplatedClass, TemplatedClass<T>> { public: typedef T type;