[Rcpp-commits] r3368 - pkg/RcppArmadillo/inst/include/RcppArmadillo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 16 12:12:20 CET 2011


Author: romain
Date: 2011-11-16 12:12:20 +0100 (Wed, 16 Nov 2011)
New Revision: 3368

Modified:
   pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h
Log:
adjust to arma's use of c++11

Modified: pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h	2011-11-16 10:49:01 UTC (rev 3367)
+++ pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h	2011-11-16 11:12:20 UTC (rev 3368)
@@ -37,8 +37,11 @@
 	
 	// TODO : deal with complex expressions because 
 	// std::complex<double> != Rcomplex
-	arma_type_check< is_same_type< eT, typename Rcpp::traits::storage_type<RTYPE>::type >::value == false >::apply();
-
+#if !defined(ARMA_USE_CXX11)
+	arma_type_check_cxx1998< is_same_type< eT, typename Rcpp::traits::storage_type<RTYPE>::type >::value == false >::apply();
+#else
+    static_assert( is_same_type< eT, typename Rcpp::traits::storage_type<RTYPE>::type >::value , "error: incorrect or unsupported type" )
+#endif
 	set_size(X.size(), 1);
 	
 	eT* ptr = memptr() ;
@@ -62,7 +65,12 @@
 	
 	// TODO : deal with complex expressions because 
 	// std::complex<double> != Rcomplex
-	arma_type_check< is_same_type< eT, typename Rcpp::traits::storage_type<RTYPE>::type >::value == false >::apply();
+#if !defined(ARMA_USE_CXX11)
+	arma_type_check_cxx1998< is_same_type< eT, typename Rcpp::traits::storage_type<RTYPE>::type >::value == false >::apply();
+#else
+    static_assert( is_same_type< eT, typename Rcpp::traits::storage_type<RTYPE>::type >::value , "error: incorrect or unsupported type" )
+#endif
+
   	
 	u32 nr = X.nrow(), nc = X.ncol(), i_col, i_row, k ;
 	set_size( nr, nc ) ;



More information about the Rcpp-commits mailing list