Skip to content
Prev 11355 / 12125 Next

[R-pkg-devel] New API in R-devel & minimum version of R

FWIW  Rcpp handles this (for CLOENV) with an ifdef:

             #if (defined(R_VERSION) && R_VERSION >= R_Version(4,5,0))
             return R_ClosureEnv(fun);
             #else
             return CLOENV(fun);
             #endif

https://github.com/RcppCore/Rcpp/blob/257e1977cd6e251d0a3d691050ad43fa29cf9666/inst/include/Rcpp/Function.h#L102-L106
On 3/19/25 11:08, Josiah Parry wrote: