22 #ifndef Rcpp_api_meat_wrap_h
23 #define Rcpp_api_meat_wrap_h
28 template <
typename InputIterator,
typename KEY,
typename VALUE,
int RTYPE>
31 R_xlen_t size = std::distance( first, last ) ;
37 for( R_xlen_t i = 0; i < size ; i++, ++first){
38 buffer = first->first ;
39 x[i] = first->second ;
42 x.
attr(
"names" ) = names ;
46 template <
typename InputIterator,
typename KEY,
typename VALUE,
int RTYPE>
48 R_xlen_t size = std::distance( first, last ) ;
53 for( R_xlen_t i = 0; i < size ; i++, ++first){
54 buffer = first->first ;
55 SET_VECTOR_ELT( x, i,
Rcpp::wrap(first->second) );
56 SET_STRING_ELT( names, i, buffer.
get_sexp() ) ;
58 ::Rf_setAttrib( x, R_NamesSymbol, names) ;
AttributeProxy attr(const std::string &name)
#define RCPP_DEBUG_3(fmt, M1, M2, M3)
#define DEMANGLE(__TYPE__)
SEXP range_wrap_dispatch___impl__pair(InputIterator first, InputIterator last, Rcpp::traits::true_type)
SEXP wrap(const Date &date)