One last question: would you consider adding a cppXPtr() function to Rcpp? It would work as cppFunction(), but it would return a XPtr instead of the function. I have a working example if you are interested. Iñaki