File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 22
33 * R/Attributes.R: Don't search the inline package as a fallback when loading plugins for the the Rcpp::plugins attribute
44
5- 2013-09-16 Romain Francois <romain@r-enthusiasts.com>
5+ 2013-09-18 Romain Francois <romain@r-enthusiasts.com>
66
77 * vignettes/Rcpp-package.Rnw: Updating the vignette. Setting attributes to TRUE
88 by default.
99 * R/Rcpp.package.skeleton.R: Setting attributes to TRUE by default. This is
1010 what we should encourage people to use.
11+ * include/Rcpp/as.h: add as<char> specialization
1112
12132013-09-17 JJ Allaire <jj@rstudio.org>
1314
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ Current active misfeatures
1010 o DataFrame::create(Named("a")=b, Named("b")=b) fails with
1111 NumericVectors
1212
13- o Single char variables do not seem to covered correctly by as<>()
14- and wrap() (cf http://stackoverflow.com/questions/16535899/)
15-
1613Documentation
1714
1815 o Finish the quickref vignette
Original file line number Diff line number Diff line change @@ -145,6 +145,10 @@ namespace Rcpp{
145145 return internal::as<T>( m_sexp, typename traits::r_type_traits<T>::r_category () ) ;
146146 }
147147
148+ template <> inline char as<char >( SEXP m_sexp ){
149+ return internal::check_single_string (m_sexp)[0 ] ;
150+ }
151+
148152 template <typename T>
149153 inline typename traits::remove_const_and_reference<T>::type bare_as ( SEXP m_sexp ){
150154 return as< typename traits::remove_const_and_reference<T>::type >( m_sexp ) ;
You can’t perform that action at this time.
0 commit comments