15 Foo(
int a,
int b) : a(a), b(b) {
30 #include <RcppCommon.h> 36 template<> SEXP
wrap(
const Foo &f);
37 template<>
Foo as(SEXP sexp);
59 Rcpp::List list = Rcpp::as<Rcpp::List>(sexp);
70 Foo result(input.
b, input.
a);
74 int main(
int argc,
char *argv[]) {
80 R[
"swapFoo"] = Rcpp::InternalFunction( &
swapFoo );
97 std::cout <<
" Got result a=" << result.
a <<
", b=" << result.
b << std::endl;
98 std::cout <<
" Expected a=42, b=12" << std::endl;
SEXP wrap(const Bar &bar)
Proxy parseEvalNT(const std::string &line)
Foo(const std::string &name, int32_t a, int32_t b)
int main(int argc, char *argv[])