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

Class FunctionObj

inst/tinytest/cpp/stack.cpp:81–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81struct FunctionObj {
82 FunctionObj(int data_, bool fail_) : data(data_), fail(fail_) { }
83 SEXP operator() () {
84 NumericVector x = maybeThrow(&fail);
85 x[0] = x[0] * data;
86 return x;
87 }
88 int data;
89 bool fail;
90};
91
92// [[Rcpp::export]]
93SEXP testUnwindProtectFunctionObject(Environment indicator, bool fail) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected