seananderson / glmmfields

R package for Bayesian spatial and spatiotemporal GLMMs with possible extremes
50 stars 10 forks source link

update for C++14 #6

Closed bgoodri closed 6 years ago

bgoodri commented 6 years ago

This PR allows your package to build with rstan 2.18.1 on CRAN, which requires C++14. I have run R CMD check on your package from a Debian system similar to that on CRAN and uploaded the tarball to https://win-builder.r-project.org/ so the package maintainer should soon see the result of running R CMD check on Windows.

If you have questions or issues, please post at https://discourse.mc-stan.org/t/how-to-update-a-package-that-has-stanheaders-and-rstan-in-its-linkingto/6041?u=bgoodri rather than, or in addition to, this PR so that other maintainers of R packages that use Stan can benefit from your experience.

If all goes well with the R CMD check, please upload a new version to CRAN soon before your package gets kicked out.

bgoodri commented 5 years ago

This got merged and then subsequently the C++14 thing got taken out. Now it is blocking the upload of StanHeaders 2.19 to CRAN because running R CMD check on glmmfields yields the error

/opt/r-devel/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:31:54: note: deduced return type only available with -std=c++14 or -std=gnu++14 /opt/r-devel/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:48:48: error: ‘apply’ function uses ‘auto’ type specifier without trailing return type constexpr auto apply(const F& f, const Tuple& t) { ^

seananderson commented 5 years ago

Apologies, that got lost while we were attempting to make the package compliant with staged installation on CRAN. I have switched it back to C++14, am running checks right now, and then will submit to CRAN immediately.

seananderson commented 5 years ago

I submitted an update to CRAN earlier today that uses C++14.