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

Function primitive_wrap__impl__cast

inst/include/Rcpp/internal/wrap.h:445–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443 */
444 template <typename T>
445 inline SEXP primitive_wrap__impl__cast(const T& object, ::Rcpp::traits::false_type) {
446 const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype;
447 Shield<SEXP> x(Rf_allocVector(RTYPE, 1));
448 r_vector_start<RTYPE>(x)[0] = object;
449 return x;
450 }
451
452 /**
453 * wraps a single primitive value when a cast is needed

Callers 1

primitive_wrap__implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected