[Rcpp-commits] r1303 - pkg/Rcpp/inst/include/Rcpp/traits

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 21 11:48:31 CEST 2010


Author: romain
Date: 2010-05-21 11:48:31 +0200 (Fri, 21 May 2010)
New Revision: 1303

Modified:
   pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h
   pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h
   pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h
Log:
added support for const int (maybe will calm suncc/solaris)

Modified: pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h	2010-05-21 08:12:47 UTC (rev 1302)
+++ pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h	2010-05-21 09:48:31 UTC (rev 1303)
@@ -32,6 +32,7 @@
  */
 template <typename T> struct r_sexptype_traits{ enum{ rtype = VECSXP }; } ;
 template<> struct r_sexptype_traits<int>{ enum{ rtype = INTSXP } ; } ;
+template<> struct r_sexptype_traits<const int>{ enum{ rtype = INTSXP } ; } ;
 template<> struct r_sexptype_traits<double>{ enum{ rtype = REALSXP } ; } ;
 template<> struct r_sexptype_traits<bool>{ enum{ rtype = LGLSXP } ; } ;
 template<> struct r_sexptype_traits<std::string>{ enum{ rtype = STRSXP } ; } ;

Modified: pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h	2010-05-21 08:12:47 UTC (rev 1302)
+++ pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h	2010-05-21 09:48:31 UTC (rev 1303)
@@ -69,6 +69,7 @@
  */
 template <typename T> struct r_type_traits< std::pair<const std::string,T> > { typedef r_type_pairstring_generic_tag r_category ; } ;
 template<> struct r_type_traits< std::pair<const std::string,int> >{ typedef r_type_pairstring_primitive_tag r_category ; } ;
+template<> struct r_type_traits< std::pair<const std::string,const int> >{ typedef r_type_pairstring_primitive_tag r_category ; } ;
 template<> struct r_type_traits< std::pair<const std::string,double> >{ typedef r_type_pairstring_primitive_tag r_category ; } ;
 template<> struct r_type_traits< std::pair<const std::string,Rbyte> >{ typedef r_type_pairstring_primitive_tag r_category ; } ;
 template<> struct r_type_traits< std::pair<const std::string,Rcomplex> >{ typedef r_type_pairstring_primitive_tag r_category ; } ;
@@ -80,6 +81,7 @@
 template<> struct r_type_traits< std::pair<const std::string,float> >{ typedef r_type_pairstring_primitive_tag r_category ; } ;
 
 template<> struct r_type_traits<int>{ typedef r_type_primitive_tag r_category ; } ;
+template<> struct r_type_traits<const int>{ typedef r_type_primitive_tag r_category ; } ;
 template<> struct r_type_traits<double>{ typedef r_type_primitive_tag r_category ; } ;
 template<> struct r_type_traits<Rbyte>{ typedef r_type_primitive_tag r_category ; } ;
 template<> struct r_type_traits<Rcomplex>{ typedef r_type_primitive_tag r_category ; } ;

Modified: pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h	2010-05-21 08:12:47 UTC (rev 1302)
+++ pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h	2010-05-21 09:48:31 UTC (rev 1303)
@@ -51,6 +51,8 @@
  * Total specialization for primitive types
  */
 template <> struct wrap_type_traits<int> { typedef wrap_type_primitive_tag wrap_category; } ;
+template <> struct wrap_type_traits<const int> { typedef wrap_type_primitive_tag wrap_category; } ;
+
 template <> struct wrap_type_traits<double> { typedef wrap_type_primitive_tag wrap_category; } ;
 template <> struct wrap_type_traits<Rbyte> { typedef wrap_type_primitive_tag wrap_category; } ;
 template <> struct wrap_type_traits<Rcomplex> { typedef wrap_type_primitive_tag wrap_category; } ;



More information about the Rcpp-commits mailing list