[mlpack-git] master, mlpack-1.0.x: Fixed arma_traits by removing duplicate template instantiation, so that visual studio would be able to use it too. (dba130c)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:45:23 EST 2015


Repository : https://github.com/mlpack/mlpack

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit dba130cdb355ca8c15ee29873dcb798b82486267
Author: birm <birm at gatech.edu>
Date:   Wed Mar 12 03:51:08 2014 +0000

    Fixed arma_traits by removing duplicate template instantiation, so that visual studio would be able to use it too.


>---------------------------------------------------------------

dba130cdb355ca8c15ee29873dcb798b82486267
 src/mlpack/core/util/arma_traits.hpp | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/mlpack/core/util/arma_traits.hpp b/src/mlpack/core/util/arma_traits.hpp
index a9728fc..ce748d5 100644
--- a/src/mlpack/core/util/arma_traits.hpp
+++ b/src/mlpack/core/util/arma_traits.hpp
@@ -32,42 +32,44 @@ struct IsVector
   const static bool value = false;
 };
 
-template<>
+// Commenting out the first template per case, because 
+//Visual Studio doesn't like this instantiaion pattern (error C2910).
+//template<>
 template<typename eT>
 struct IsVector<arma::Col<eT> >
 {
   const static bool value = true;
 };
 
-template<>
+//template<>
 template<typename eT>
 struct IsVector<arma::SpCol<eT> >
 {
   const static bool value = true;
 };
 
-template<>
+//template<>
 template<typename eT>
 struct IsVector<arma::Row<eT> >
 {
   const static bool value = true;
 };
 
-template<>
+//template<>
 template<typename eT>
 struct IsVector<arma::SpRow<eT> >
 {
   const static bool value = true;
 };
 
-template<>
+//template<>
 template<typename eT>
 struct IsVector<arma::subview_col<eT> >
 {
   const static bool value = true;
 };
 
-template<>
+//template<>
 template<typename eT>
 struct IsVector<arma::subview_row<eT> >
 {
@@ -76,7 +78,8 @@ struct IsVector<arma::subview_row<eT> >
 
 // I'm not so sure about this one.  An SpSubview object can be a row or column,
 // but it can also be a matrix subview.
-template<>
+
+//template<>
 template<typename eT>
 struct IsVector<arma::SpSubview<eT> >
 {



More information about the mlpack-git mailing list