lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [4800] Prefer 'typename' to 'class' in template type-param


From: Greg Chicares
Subject: [lmi-commits] [4800] Prefer 'typename' to 'class' in template type-parameters
Date: Sun, 21 Mar 2010 21:19:40 +0000

Revision: 4800
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4800
Author:   chicares
Date:     2010-03-21 21:19:40 +0000 (Sun, 21 Mar 2010)
Log Message:
-----------
Prefer 'typename' to 'class' in template type-parameters

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/catch_exceptions.hpp
    lmi/trunk/database.hpp
    lmi/trunk/ihs_dbvalue.cpp
    lmi/trunk/multidimgrid_safe.hpp
    lmi/trunk/multidimgrid_safe.tpp
    lmi/trunk/round_test.cpp
    lmi/trunk/round_to_test.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/ChangeLog 2010-03-21 21:19:40 UTC (rev 4800)
@@ -24549,3 +24549,16 @@
   xml_serializable.tpp
 Refactor, moving read() and write() to the base class.
 
+20100321T2119Z <address@hidden> [761]
+
+  catch_exceptions.hpp
+  database.hpp
+  ihs_dbvalue.cpp
+  multidimgrid_safe.hpp
+  multidimgrid_safe.tpp
+  round_test.cpp
+  round_to_test.cpp
+Prefer 'typename' to 'class' in template type-parameters. There is no
+semantic difference between the two [14.1/2]. This convention had
+already been followed in almost every case.
+

Modified: lmi/trunk/catch_exceptions.hpp
===================================================================
--- lmi/trunk/catch_exceptions.hpp      2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/catch_exceptions.hpp      2010-03-21 21:19:40 UTC (rev 4800)
@@ -86,7 +86,7 @@
   // catch_exceptions  ------------------------------------------------------//
 
     // A function object to run the 'main' function.
-    template<class Generator>
+    template<typename Generator>
     int catch_exceptions
         (Generator     function_object
         ,std::ostream& out

Modified: lmi/trunk/database.hpp
===================================================================
--- lmi/trunk/database.hpp      2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/database.hpp      2010-03-21 21:19:40 UTC (rev 4800)
@@ -65,7 +65,7 @@
 
     // Return scalar: use double because it's convertible to int, bool, etc.
     // We'd rather do something like
-    //   template<class T, class DBValue>
+    //   template<typename T, typename DBValue>
     //   void Query(T& dst, int k) const;
     // but bc++5.02 can't handle member template functions.
     double Query(int k) const;

Modified: lmi/trunk/ihs_dbvalue.cpp
===================================================================
--- lmi/trunk/ihs_dbvalue.cpp   2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/ihs_dbvalue.cpp   2010-03-21 21:19:40 UTC (rev 4800)
@@ -58,7 +58,7 @@
 #include <string>
 #include <vector>
 
-template<class T>
+template<typename T>
 JRPS::JrPs_ipstream& operator>> (JRPS::JrPs_ipstream& ips, std::vector<T>& x)
 {
     x.erase(x.begin(), x.end());
@@ -75,7 +75,7 @@
     return ips;
 }
 
-template<class T>
+template<typename T>
 JRPS::JrPs_opstream& operator<< (JRPS::JrPs_opstream& ops, std::vector<T> 
const& x)
 {
     ops << x.size();

Modified: lmi/trunk/multidimgrid_safe.hpp
===================================================================
--- lmi/trunk/multidimgrid_safe.hpp     2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/multidimgrid_safe.hpp     2010-03-21 21:19:40 UTC (rev 4800)
@@ -257,7 +257,7 @@
 /// DoCreateAdjustControl().
 /// Do not override this method, override DoCreateAdjustControl instead.
 
-template<class AdjustControl, class BaseAxisType = MultiDimAxisAny>
+template<typename AdjustControl, typename BaseAxisType = MultiDimAxisAny>
 class MultiDimAdjustableAxis
     :public BaseAxisType
 {

Modified: lmi/trunk/multidimgrid_safe.tpp
===================================================================
--- lmi/trunk/multidimgrid_safe.tpp     2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/multidimgrid_safe.tpp     2010-03-21 21:19:40 UTC (rev 4800)
@@ -173,7 +173,7 @@
 /// MultiDimAdjustableAxis<AdjustControl, BaseAxisType>
 /// ---------------------------------------------------
 
-template<class AdjustControl, class BaseAxisType>
+template<typename AdjustControl, typename BaseAxisType>
 wxWindow* MultiDimAdjustableAxis<AdjustControl, 
BaseAxisType>::CreateAdjustControl
     (MultiDimGrid& grid
     ,MultiDimTableAny& table
@@ -182,7 +182,7 @@
     return DoCreateAdjustControl(grid, table);
 }
 
-template<class AdjustControl, class BaseAxisType>
+template<typename AdjustControl, typename BaseAxisType>
 bool MultiDimAdjustableAxis<AdjustControl, BaseAxisType>::ApplyAdjustment
     (wxWindow& adjust_window
     ,unsigned int axis_id
@@ -195,7 +195,7 @@
         );
 }
 
-template<class AdjustControl, class BaseAxisType>
+template<typename AdjustControl, typename BaseAxisType>
 bool MultiDimAdjustableAxis<AdjustControl, BaseAxisType>::RefreshAdjustment
     (wxWindow& adjust_window
     ,unsigned int axis_id
@@ -208,7 +208,7 @@
         );
 }
 
-template<class AdjustControl, class BaseAxisType>
+template<typename AdjustControl, typename BaseAxisType>
 MultiDimAdjustableAxis<AdjustControl, BaseAxisType>::MultiDimAdjustableAxis
     (std::string const& name
     )

Modified: lmi/trunk/round_test.cpp
===================================================================
--- lmi/trunk/round_test.cpp    2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/round_test.cpp    2010-03-21 21:19:40 UTC (rev 4800)
@@ -169,7 +169,7 @@
  */
 // GWC modified the code as noted below, e.g. to print in byte-reversed
 // order as well, and made some trivial formatting changes.
-template<class T>
+template<typename T>
 void print_hex_val(T t, char const* name)
 {
   // GWC changed C cast to reinterpret_cast:

Modified: lmi/trunk/round_to_test.cpp
===================================================================
--- lmi/trunk/round_to_test.cpp 2010-03-21 13:42:22 UTC (rev 4799)
+++ lmi/trunk/round_to_test.cpp 2010-03-21 21:19:40 UTC (rev 4800)
@@ -157,7 +157,7 @@
  */
 // GWC modified the code as noted below, e.g. to print in byte-reversed
 // order as well, and made some trivial formatting changes.
-template<class T>
+template<typename T>
 void print_hex_val(T t, char const* name)
 {
   // GWC changed C cast to reinterpret_cast:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]