[Rcpp-commits] r1707 - pkg/Rcpp/inst/include/Rcpp/sugar/operators

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 24 10:46:13 CEST 2010


Author: romain
Date: 2010-06-24 10:46:12 +0200 (Thu, 24 Jun 2010)
New Revision: 1707

Modified:
   pkg/Rcpp/inst/include/Rcpp/sugar/operators/not.h
Log:
adjust operator not


Modified: pkg/Rcpp/inst/include/Rcpp/sugar/operators/not.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/operators/not.h	2010-06-24 08:42:17 UTC (rev 1706)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/operators/not.h	2010-06-24 08:46:12 UTC (rev 1707)
@@ -72,11 +72,12 @@
 	
 	
 
-	template <int RTYPE, bool _NA_, typename VEC_TYPE>
-	class Not_Vector : public Rcpp::VectorBase<LGLSXP,_NA_, Not_Vector<RTYPE,_NA_,VEC_TYPE> > {
+	template <int RTYPE, bool NA, typename T>
+	class Not_Vector : public Rcpp::VectorBase<LGLSXP,NA, Not_Vector<RTYPE,NA,T> > {
 	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
 		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
-		typedef not_<RTYPE,_NA_> OPERATOR ;
+		typedef not_<RTYPE,NA> OPERATOR ;
 		
 		Not_Vector( const VEC_TYPE& lhs_ ) : 
 			lhs(lhs_), op() {}
@@ -86,7 +87,6 @@
 		}
 		
 		inline int size() const { return lhs.size() ; }
-	
 		
 	private:
 		const VEC_TYPE& lhs ;
@@ -96,12 +96,12 @@
 }
 }
 
-template <int RTYPE,bool _NA_, typename T>
-inline Rcpp::sugar::Not_Vector< RTYPE , _NA_ , Rcpp::VectorBase<RTYPE,_NA_,T> >
+template <int RTYPE,bool NA, typename T>
+inline Rcpp::sugar::Not_Vector< RTYPE , NA , T >
 operator!( 
-	const Rcpp::VectorBase<RTYPE,_NA_,T>& x
+	const Rcpp::VectorBase<RTYPE,NA,T>& x
 ) {
-	return Rcpp::sugar::Not_Vector<RTYPE,_NA_, Rcpp::VectorBase<RTYPE,_NA_,T> >( x ) ;
+	return Rcpp::sugar::Not_Vector<RTYPE,NA, T >( x ) ;
 }
 
 



More information about the Rcpp-commits mailing list