Skip to content

Conversation

@DavisVaughan
Copy link
Contributor

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:
r-lib/cpp11#390

The recommended way is to use cpp11::as_cpp<double>(), which checks the type and length before performing the conversion, and is also explicit, which is a good thing for this kind of conversion.

I'm not going to remove these in the upcoming version of cpp11, but we will in the next after that

@Nowosad
Copy link
Owner

Nowosad commented Aug 24, 2024

Thank you @DavisVaughan

@Nowosad Nowosad merged commit 3f6587b into Nowosad:master Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants