From 214452a47c928967c4c32669d5d765b667d42412 Mon Sep 17 00:00:00 2001 From: dincerti Date: Fri, 9 Jan 2026 13:04:19 -0800 Subject: [PATCH 1/3] fix: update C++ standard from C++11 to C++17 --- src/Makevars | 2 +- src/Makevars.win | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makevars b/src/Makevars index d706b91f..edaaff89 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,4 +1,4 @@ -CXX_STD=C++11 +CXX_STD=CXX17 PKG_CPPFLAGS = -I../inst/include VER= CCACHE=ccache diff --git a/src/Makevars.win b/src/Makevars.win index 987bc021..7973b639 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,3 +1,3 @@ -CXX_STD=C++11 +CXX_STD=CXX17 PKG_CPPFLAGS = -I../inst/include PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) \ No newline at end of file From 3f93052d644d35bde7d16d51391b2185f3345826 Mon Sep 17 00:00:00 2001 From: dincerti Date: Fri, 9 Jan 2026 13:12:43 -0800 Subject: [PATCH 2/3] chore: bump to v0.8.0 --- DESCRIPTION | 2 +- NEWS.md | 3 +++ cran-comments.md | 8 ++------ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ad7cd806..a07d4b54 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: hesim Type: Package Title: Health Economic Simulation Modeling and Decision Analysis -Version: 0.5.7 +Version: 0.5.8 Authors@R: c( person("Devin", "Incerti", , "devin.incerti@gmail.com", role = c("aut", "cre")), person("Jeroen P.", "Jansen", role = "aut"), diff --git a/NEWS.md b/NEWS.md index d569eea8..b85b0210 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +## hesim 0.5.8 +Fix CRAN check warnings by updating C++ standard from C++11 to C++17. + ## hesim 0.5.7 Fix memory access issue identified in piecewise exponential distributions by ensuring that the `time` and `rate` vectors are of the same length. Previously, diff --git a/cran-comments.md b/cran-comments.md index 6401ec47..9cccc767 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,10 +1,6 @@ ## Release summary -The purpose of this release is to fix memory access issues identified by -`clang-ASAN` and `gcc-ASAN` during the CRAN checks. - -The error was first reproduced on R-hub `clang-asan` and `gcc-asan`. After -the fix, it was then confirmed that `clang-asan` and `gcc-asan` did not -produce any errors. +The purpose of this release is to fix CRAN check warnings by +updating the C++ standard from C++11 to C++17. ## R CMD check results 0 errors | 0 warnings | 0 notes From 619004532c3a041429ff9b08fd2deb4a9eee2056 Mon Sep 17 00:00:00 2001 From: dincerti Date: Mon, 12 Jan 2026 12:29:13 -0800 Subject: [PATCH 3/3] test: move PwExp validation test inside test_that block --- tests/testthat/test-cpp-distributions.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-cpp-distributions.R b/tests/testthat/test-cpp-distributions.R index f633908e..356b764c 100644 --- a/tests/testthat/test-cpp-distributions.R +++ b/tests/testthat/test-cpp-distributions.R @@ -94,14 +94,14 @@ test_that("pwexp", { r <- replicate(10, pwexp$trandom(max(time) + 1, Inf)) expect_true(all(r >= max(time) + 1)) + + # An error is thrown if time and rate are not the same length + expect_error( + new(PwExp, rate = c(1, 2), time = c(0, 2, 4)), + "'time' and 'rate' must be the same length." + ) }) -# An error is thrown if time and rate are not the same length -expect_error( - new(PwExp, rate = c(1, 2), time = c(0, 2, 4)), - "'time' and 'rate' must be the same length." -) - # Weibull distribution (AFT) --------------------------------------------------- test_that("weibull", {