Skip to content

Commit

Permalink
Fix packages with stanfunctions under rstan 2.33+
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Sep 11, 2023
1 parent fcd263a commit ca9fc61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/rstan_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ rstan_config <- function(pkgdir = ".") {
# Stanc3 gives 'auto' return type for standalone functions, which
# causes errors with Rcpp::export, so need to replace the auto
# return with the plain type from the main definition
if(utils::packageVersion('rstan') >= "2.26") {
if(utils::packageVersion('rstan') >= "2.26" && utils::packageVersion('StanHeaders') < "2.33") {
# Extract line numbers of functions to be exported
decl_lines = grep("// \\[\\[Rcpp::export]]",cpp_lines) + 1

Expand Down

0 comments on commit ca9fc61

Please sign in to comment.