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 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 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", {