approvals / ApprovalTests.cpp.StarterProject

Starter project for easy learning and use of ApprovalTests.cpp
11 stars 9 forks source link

Errors building with Catch v2.11.0 but works with v2.13.8 #17

Open reedhedges opened 2 years ago

reedhedges commented 2 years ago

I updated catch2 to 2.13.8 (latest version of v2) and the build works now.

(Just downloaded it to lib/catch2/include/catch2 as catch.v2.13.8.hppand edited lib/catch2/include/catch2/catch3.hpp to include the new version)

Before upgrading catch2 I received 2 compile errors:

/home/reed/examples/ApprovalTestsCpp_StarterProject/lib/catch2/include/catch2/catch.v2.11.0.hpp:10717:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10717 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;

and

/home/reed/examples/ApprovalTestsCpp_StarterProject/lib/catch2/include/catch2/catch.v2.11.0.hpp:10776:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10776 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};

on Linux with g++ 11.2.0.

claremacrae commented 2 years ago

Thanks for the report. Glad to hear that you got it working.

reedhedges commented 2 years ago

Should it be updated in the repository? Let me know if you'd like a PR to do so.