mirror of
https://github.com/catchorg/Catch2.git
synced 2025-07-03 16:15:32 +02:00

issue #1356 A constant expression can be checked at compile time; if the user wishes to check something they known can be checked at compile time, then they can now STATIC_REQUIRE. By default this will use REQUIRE and be at runtime, such that other assertions can be run. It can be enabled by defining CATCH_USE_STATIC_REQUIRE This uses static_assert; as some compilers cannot handle the modern: static_assert(expr) and require the older form with a message: static_assert(expr, desc) the expression has been included as the message, rather than leaving it as an empty string, which can be a warning on some linters.