diff options
| author | Martin Hořeňovský | 2017-06-15 11:43:31 +0200 |
|---|---|---|
| committer | Phil Nash | 2017-06-26 16:50:23 +0100 |
| commit | 7bcfdf8e9441ddf38667f2a10f671d122147f0fa (patch) | |
| tree | fafd8cb11f0b0bdeb1bc653b32b4660e537693ae /include | |
| parent | 8d5f6c8e2e5fdf355014f410c173ad5cd38e0bf8 (diff) | |
| download | catch3-7bcfdf8e9441ddf38667f2a10f671d122147f0fa.tar.gz | |
Disable deprecation warning of std::uncaught_exception
We might prefer to use `std::uncaught_exceptions` in the future, but I
would prefer not to bring in more configuration into Catch Classic
Closes #927
Diffstat (limited to 'include')
| -rw-r--r-- | include/internal/catch_section.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |