Skip to content

Commit

Permalink
fixed "warning STL4006: std::uncaught_exception() is deprecated in C+…
Browse files Browse the repository at this point in the history
…+17" in catch
  • Loading branch information
acki-m committed Feb 17, 2018
1 parent d20a6cc commit 28a9c02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 3rd_party/catch-1.12.0/catch/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8501,11 +8501,18 @@ namespace Catch {
: m_info( other.m_info )
{}

#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
#endif
ScopedMessage::~ScopedMessage() {
if ( !std::uncaught_exception() ){
getResultCapture().popScopedMessage(m_info);
}
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

} // end namespace Catch

Expand Down

0 comments on commit 28a9c02

Please # to comment.