Closed
Description
This seems fairly restrictive? I feel like you should be able to copy proxy elements of the same type from one writable vector to another.
cpp11::cpp_function("
cpp11::writable::doubles test() {
cpp11::writable::doubles x({1, 2, 3});
cpp11::writable::doubles y({4, 5, 6});
for (R_xlen_t i = 0; i < x.size(); ++i) {
y[i] = x[i];
}
return y;
}
")
#> object of type 'cpp11::writable::r_vector<double>::proxy' cannot be assigned because its copy assignment operator is implicitly deleted
#> y[i] = x[i];
#> copy assignment operator of 'proxy' is implicitly deleted because field 'data_' is of const-qualified type 'const SEXP' (aka 'SEXPREC *const')
#> const SEXP data_;
#> error generated.
#> make: *** [/private/var/folders/41/qx_9ygp112nfysdfgxcssgwc0000gn/T/Rtmpp0Qrcn/code_13be14d8f81cc.o] Error 1
#> make: *** Waiting for unfinished jobs....
#> Error: Compilation failed.
Created on 2022-11-11 with reprex v2.0.2.9000
Metadata
Metadata
Assignees
Labels
No labels