Add std::uncaught_exceptions() to libcxxrt (C++17, see N4152 and N4259).

This has also been submitted upstream.
This commit is contained in:
dim 2015-10-05 17:47:23 +00:00
parent c88ca1c406
commit d463dc0074
2 changed files with 15 additions and 0 deletions

View File

@ -1473,6 +1473,15 @@ namespace std
__cxa_thread_info *info = thread_info();
return info->globals.uncaughtExceptions != 0;
}
/**
* Returns the number of exceptions currently being thrown that have not
* been caught. This can occur inside a nested catch statement.
*/
int uncaught_exceptions() throw()
{
__cxa_thread_info *info = thread_info();
return info->globals.uncaughtExceptions;
}
/**
* Returns the current unexpected handler.
*/

View File

@ -356,3 +356,9 @@ GLIBCXX_3.4.9 {
};
} GLIBCXX_3.4;
GLIBCXX_3.4.22 {
extern "C++" {
"std::uncaught_exceptions()";
};
} GLIBCXX_3.4.9;