Skip to content

Commit a398603

Browse files
committed
set USE_CXX11 (closes #683)
1 parent e81493b commit a398603

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2017-04-25 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/Attributes.R (.plugins[["cpp11"]]): If R 3.4.0 or newer is used, set
4+
USE_CXX11 (instead of the older USE_CXX1X)
5+
16
2017-04-22 Nathan Russell <[email protected]>
27

38
* inst/include/Rcpp/sugar/functions/strings/trimws.h: Added sugar

R/Attributes.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
458458

459459
# built-in C++11 plugin
460460
.plugins[["cpp11"]] <- function() {
461-
if (getRversion() >= "3.1") # with recent R versions, R can decide
461+
if (getRversion() >= "3.4") # with recent R versions, R can decide
462+
list(env = list(USE_CXX11 = "yes"))
463+
else if (getRversion() >= "3.1") # with recent R versions, R can decide
462464
list(env = list(USE_CXX1X = "yes"))
463465
else if (.Platform$OS.type == "windows")
464466
list(env = list(PKG_CXXFLAGS = "-std=c++0x"))

0 commit comments

Comments
 (0)