Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7607dd3

Browse filesBrowse files
committed
Support C++26
Tested locally and had success with R-devel but not R-release but that may well be due to my R-release being the packaged .deb built with a more conservative g++ version. A local R 4.5.0 should also work with proper g++ or clang++
1 parent 4a26f7e commit 7607dd3
Copy full SHA for 7607dd3

File tree

2 files changed

+11
-0
lines changed
Filter options

2 files changed

+11
-0
lines changed

‎ChangeLog

Copy file name to clipboardExpand all lines: ChangeLog
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-05-06 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* R/Attributes.R: Support C++26 via plugin
4+
15
2025-05-05 Dirk Eddelbuettel <edd@debian.org>
26

37
* inst/tinytest/test_sugar.R: Condition four NA-related tests away on

‎R/Attributes.R

Copy file name to clipboardExpand all lines: R/Attributes.R
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,13 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
560560
list(env = list(PKG_CXXFLAGS ="-std=c++23"))
561561
}
562562

563+
# built-in C++26 plugin for C++26
564+
.plugins[["cpp26"]] <- function() {
565+
if (getRversion() >= "4.5") # with recent R versions, R can decide
566+
list(env = list(USE_CXX26 = "yes"))
567+
else
568+
list(env = list(PKG_CXXFLAGS ="-std=c++26"))
569+
}
563570

564571
## built-in C++1z plugin for C++17 standard under development
565572
## note that as of Feb 2017 this is taken to be a moving target

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.