cpp11
cpp11 copied to clipboard
cpp11 helps you to interact with R objects using C++ code.
see #402, not 405
We need to introduce it to avoid this with clang19 ``` In file included from /home/hornik/lib/R/Library/4.5/x86_64-linux-gnu/cpp11/include/cpp11.hpp:3: /home/hornik/lib/R/Library/4.5/x86_64-linux-gnu/cpp11/include/cpp11/R.hpp:11:9: warning: 'R_NO_REMAP' macro redefined [-Wmacro-redefined] 11 | #define R_NO_REMAP | ^ :5:9: note:...
Happy to provide more motivation if and when an implementation can be attempted realistically. - [duckdb/duckdb-r@`6f4979d` (#387)](https://github.com/duckdb/duckdb-r/pull/387/commits/6f4979db3f9c337a9afbf18fbe0584ff44dcf430): Support overriding what's passed to `R_MakeExternalPtr()` - [duckdb/duckdb-r@`fe615c4` (#387)](https://github.com/duckdb/duckdb-r/pull/387/commits/fe615c4aee1a34eb567dd8ab80bab7bc41171ec2): Support using `BEGIN_CPP11` and...
It's been a few years, in general there's been a lot of work done https://vitaut.net/posts/2024/binary-size/
i.e. to support things like https://github.com/r-lib/cpp11/issues/315 where you default construct the vector and immediately try and put attributes on it. Would also simplify internal code that currently has to account...
cpp11 currently allows some somewhat scary implicit conversions between `sexp` and the 3 types `bool`, `size_t`, and `double`. These are unchecked conversions, and we'd like to remove them. However, doing...
``` Function cpp11::writable::r_vector::r_vector(std::initializer_list)::{lambda()#1}::operator()() const [UP] unprotected variable names while calling allocating function Rf_mkCharCE cpp11/include/cpp11/list.hpp:91 Function cpp11::writable::r_vector::r_vector(std::initializer_list)::{lambda()#1}::operator()() const [UP] unprotected variable names while calling allocating function Rf_mkCharCE cpp11/include/cpp11/r_vector.hpp:890 ``` https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/adfExplorer.out https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/cpp11bigwig.out...
To convert from `std::vector` to `cpp11::strings` you might do `cpp11::strings(as_sexp(x))`. That goes through `as_sexp_strings()` which looks like it could be a little more efficient. Rather than calling `safe[Rf_mkCharCE]` on each...
In #458, I propose marginal changes that bring safe speedups.