MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / range_wrap_dispatch___impl__pair

Function range_wrap_dispatch___impl__pair

inst/include/Rcpp/api/meat/wrap.h:29–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
29inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::true_type ){
30 RCPP_DEBUG_3( "range_wrap_dispatch___impl__pair<KEY = %s, VALUE = %s, RTYPE = %d>\n", DEMANGLE(KEY), DEMANGLE(VALUE), RTYPE)
31 R_xlen_t size = std::distance( first, last ) ;
32 //typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
33
34 CharacterVector names(size) ;
35 Vector<RTYPE> x(size) ;
36 Rcpp::String buffer ;
37 for( R_xlen_t i = 0; i < size ; i++, ++first){
38 buffer = first->first ;
39 x[i] = first->second ;
40 names[i] = buffer ;
41 }
42 x.attr( "names" ) = names ;
43 return x ;
44}
45
46template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
47inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::false_type ){

Callers

nothing calls this directly

Calls 3

attrMethod · 0.80
wrapFunction · 0.70
get_sexpMethod · 0.45

Tested by

no test coverage detected