catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Disable deprecation warning of std::uncaught_exception
- Commit
7bcfdf8e9441ddf38667f2a10f671d122147f0fa- Author
- Martin Hořeňovský ·
- Committer
- Phil Nash
- Parents
8d5f6c8e2e5f
Changes
include/internal/catch_section.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/internal/catch_section.hpp b/include/internal/catch_section.hpp index a5d1b6d5..aab721f6 100644 --- a/include/internal/catch_section.hpp +++ b/include/internal/catch_section.hpp @@ -30,6 +30,10 @@ namespace Catch { m_timer.start(); } +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17 +#endif Section::~Section() { if( m_sectionIncluded ) { SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() ); @@ -39,6 +43,9 @@ namespace Catch { getResultCapture().sectionEnded( endInfo ); } } +#if defined(_MSC_VER) +#pragma warning(pop) +#endif // This indicates whether the section should be executed or not Section::operator bool() const {