Fix CXX23 compatibility issues#2278
Conversation
|
Would you mind explaining what the root problem is and why it needs a ~18K line patch to fix it? |
yes, sorry the long detail but I am here to explain :)
I know this PR reads "too forward", but once CRAN starts testing compiled code with C++23, this issue will show up. The current Catch 1.9 that testthat uses works perfectly well with <= C++20 |
|
hi @hadley just a follow-up is this PR ok or does it need changed? Catch 2 is the proper library for C++23 and newer |
|
This isn't the sort of work we're likely to embark on until it's necessary for CRAN. |
thx, I'll leave this here and use my branch to test with CXX23 |
|
This started kicking back today with GHA (Mac). Until 2 days ago, the GHA SDK kit was working ok as it was using a slightly older standard. Today: 2 days ago: |
CXX23 is strict about the lhs operand, which means the current Catch version (1.9.6) used with testthat will cause multiple compilation errors not because of the tested package but because of the vendored Catch header.
This PR shows the scripts I used to use Catch2 with testthat.
I implemented this after noticing that cpp4r does not pass all tests when enforcing CXX23 with the GNU compiler.