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

Function Function_Impl

inst/include/Rcpp/Function.h:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 RCPP_GENERATE_CTOR_ASSIGN(Function_Impl)
37
38 Function_Impl(SEXP x){
39 switch( TYPEOF(x) ){
40 case CLOSXP:
41 case SPECIALSXP:
42 case BUILTINSXP:
43 Storage::set__(x);
44 break;
45 default: // #nocov start
46 const char* fmt = "Cannot convert object to a function: "
47 "[type=%s; target=CLOSXP, SPECIALSXP, or "
48 "BUILTINSXP].";
49 throw not_compatible(fmt, Rf_type2char(TYPEOF(x)));
50 } // #nocov end
51 }
52
53 /**
54 * Finds a function. By default, searches from the global environment

Callers

nothing calls this directly

Calls 1

stopFunction · 0.85

Tested by

no test coverage detected