cpp11
cpp11 copied to clipboard
`BEGIN_CPP11 + END_CPP11` -> using `Rf_errorcall(call, ...)`
trafficstars
I believe we could expand on END_CPP11 (or add a sibling).
https://github.com/r-lib/cpp11/blob/51f4cd5ad9425a491dedf951a3679346d416e51c/inst/include/cpp11/declarations.hpp#L47-L63
so that it would take parameters, easily generated in generate_cpp_functions(), i.e. package and funs$name
https://github.com/r-lib/cpp11/blob/51f4cd5ad9425a491dedf951a3679346d416e51c/R/register.R#L165-L185
so that we could construct a call to use in Rf_errorcall() instead of using R_NilValue.
I did something similar in duckdb, it has cpp11 vendored.