Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

use_cpp11, use_cpp14, use_cpp17 #307

Closed
romainfrancois opened this issue Mar 10, 2018 · 8 comments
Closed

use_cpp11, use_cpp14, use_cpp17 #307

romainfrancois opened this issue Mar 10, 2018 · 8 comments
Labels
code 🖥️ R/, tests/ description 📚 feature a feature request or enhancement help wanted ❤️ we'd love your help!

Comments

@romainfrancois
Copy link
Contributor

I can't never remember what I have to do for variants of C++.
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b11-code
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b14-code
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b17-code

Should I make the relevant use_cpp_ functions ?

@jennybc
Copy link
Member

jennybc commented Mar 10, 2018

Sounds good to me! cc @hadley @jimhester

@romainfrancois
Copy link
Contributor Author

might be an argument to use_rcpp or standalone functions, or both.
Using C++ does not necessarily mean using Rcpp.

@hadley hadley added feature a feature request or enhancement description 📚 code 🖥️ R/, tests/ labels Nov 24, 2018
@hadley
Copy link
Member

hadley commented Nov 25, 2018

Random API thoughts:

You don't have to use Rcpp with C++, but it's certainly the most common way, so I wouldn't expend much effort on an API that doesn't use Rcpp (and looking at use_rcpp() there's really not much there).

We probably should extract out a use_src() which would do:

use_directory("src")
use_git_ignore(c("*.o", "*.so", "*.dll"), "src")

We may also extend use_rcpp() to take a name (a la #117).

@romainfrancois
Copy link
Contributor Author

This is somewhat orthogonal to Rcpp or not Rcpp, and more about when you want to use some C++ standard with or without Rcpp.

@hadley hadley added the help wanted ❤️ we'd love your help! label Jan 4, 2019
@coatless
Copy link
Contributor

This would be an ideal extension candidate for the use_makevars() function sitting in #601. With this being said, the present implementation would require more versatility by parseing the file in a similar way to the DESCRIPTION parser used by use_description() to check for duplicates. One step at a time though...

@jennybc
Copy link
Member

jennybc commented Mar 28, 2019

I'm putting this in the backlog w.r.t. preparing the release of v1.5.0. If anyone has immediate plans to move on this, let me know.

@jennybc jennybc added this to the Backlog milestone Mar 28, 2019
@coatless
Copy link
Contributor

@jennybc no immediate plan to move on this. I'll likely have cycles in summer/fall to develop a makevars parser package similar to desc.

Might also be worth noting @jeroen's makeconf package does wonders for understanding a user's compile options.

@jennybc jennybc removed this from the Backlog milestone Apr 10, 2019
@jennybc
Copy link
Member

jennybc commented Jul 10, 2020

Just added use_cpp11() in 194db5b. It doesn't feel like we have any highly specific, near terms plans to do more in this area.

@jennybc jennybc closed this as completed Jul 10, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
code 🖥️ R/, tests/ description 📚 feature a feature request or enhancement help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

4 participants