Skip to content

Commit 0664c1a

Browse files
authored
Merge pull request #927 from RcppCore/feature/c++2a_plugin
new C++2a plugin for g++ 8 or later
2 parents 4f168e6 + 32ff3a6 commit 0664c1a

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2018-12-01 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/Attributes.R: Added new 'c++2a' plugin for '-std=c++2a'
4+
compilation standard supported by g++ 8 or later
5+
16
2018-11-11 Dirk Eddelbuettel <[email protected]>
27

38
* inst/include/Rcpp/vector/Subsetter.h (check_indices): More

R/Attributes.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Copyright (C) 2012 - 2017 JJ Allaire, Dirk Eddelbuettel and Romain Francois
2+
# Copyright (C) 2012 - 2018 JJ Allaire, Dirk Eddelbuettel and Romain Francois
33
#
44
# This file is part of Rcpp.
55
#
@@ -469,7 +469,7 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
469469
# setup plugins environment
470470
.plugins <- new.env()
471471

472-
# built-in C++98 plugin
472+
# built-in C++98 plugin
473473
.plugins[["cpp98"]] <- function() {
474474
if (getRversion() >= "3.4") # with recent R versions, R can decide
475475
list(env = list(USE_CXX98 = "yes"))
@@ -523,6 +523,12 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
523523
list(env = list(PKG_CXXFLAGS ="-std=c++1z"))
524524
}
525525

526+
## built-in C++2a plugin for g++ 8 and later
527+
## cf https://gcc.gnu.org/projects/cxx-status.html as of Dec 2018
528+
.plugins[["cpp2a"]] <- function() {
529+
list(env = list(PKG_CXXFLAGS ="-std=c++2a"))
530+
}
531+
526532
## built-in OpenMP plugin
527533
.plugins[["openmp"]] <- function() {
528534
list(env = list(PKG_CXXFLAGS="-fopenmp",

inst/NEWS.Rd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
\itemize{
99
\item Subsetting is no longer limited by an integer range (William
1010
Nolan in \ghpr{920} fixing \ghit{919}).
11+
\item Error messages from subsetting are now more informative
12+
(Qiang and Dirk).
13+
}
14+
\item Changes in Rcpp Attributes:
15+
\itemize{
16+
\item A new plugin was added for C++20 (Dirk in \ghpr{927})
1117
}
1218
}
1319
}

0 commit comments

Comments
 (0)