Skip to content

Commit 41c1931

Browse files
committed
Fix accidental forcing of c++14 on windows
1 parent 838adc2 commit 41c1931

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

rstan/rstan/R/plugin.R

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ PKG_CPPFLAGS_env_fun <- function() {
6060
' -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION ',
6161
' -D_HAS_AUTO_PTR_ETC=0 ',
6262
' -include ', shQuote(Eigen), ' ',
63-
ifelse (.Platform$OS.type == "windows", ' -std=c++1y',
64-
' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 '),
63+
' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1',
6564
sep = '')
6665
}
6766

@@ -121,19 +120,12 @@ rstanplugin <- function() {
121120
paste0("-L", shQuote(RcppParallel_pkg_libs)),
122121
tbb_libs,
123122
utils::capture.output(RcppParallel::RcppParallelLibs()))
124-
if (.Platform$OS.type == "windows") {
125-
list(includes = '// [[Rcpp::plugins(cpp14)]]\n',
126-
body = function(x) x,
127-
env = list(PKG_LIBS = PL,
128-
PKG_CPPFLAGS = paste(Rcpp_plugin$env$PKG_CPPFLAGS,
129-
PKG_CPPFLAGS_env_fun(), collapse = " ")))
130-
} else {
131-
list(includes = '// [[Rcpp::plugins(cpp14)]]\n',
123+
124+
list(includes = '// [[Rcpp::plugins(cpp17)]]\n',
132125
body = function(x) x,
133126
env = list(PKG_LIBS = PL,
134127
PKG_CPPFLAGS = paste(Rcpp_plugin$env$PKG_CPPFLAGS,
135128
PKG_CPPFLAGS_env_fun(), collapse = " ")))
136-
}
137129
}
138130

139131

0 commit comments

Comments
 (0)