[Rcpp-devel] Passing template class as argument in Rcpp function

Dirk Eddelbuettel edd at debian.org
Thu Mar 4 18:03:13 CET 2021


Recall that R offers us a C language interface

   SEXP .Call("somename", SEXP a, SEXP b, ...);

which imposes constraints on what you put there. I.e. no C++ fancypants.

You can write yourself a _C_ function interface and pass your desired type as
a string, or enum (i.e. int), or ... and then dispatch within.

We are playing the hands we've been dealt here.

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list