Fixed deprecation warning about std::uncaught_exception in c++17 for msvc

This commit is contained in:
Mathieu Champlon 2018-03-23 18:18:23 +01:00
parent 61d5cf5634
commit c42b708950
4 changed files with 20 additions and 1 deletions

View file

@ -86,6 +86,15 @@ namespace detail
E* e_;
};
inline int uncaught_exceptions()
{
#ifdef MOCK_UNCAUGHT_EXCEPTIONS
return std::uncaught_exceptions();
#else
return std::uncaught_exception() ? 1 : 0;
#endif
}
}
} // mock