Compare commits

..

4 Commits

Author SHA1 Message Date
Howard Hinnant
514aeaef73 Tagging 11
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/tags/libcpp-11@121003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-06 15:24:26 +00:00
Howard Hinnant
7a0248d2d7 Add a couple more std-qualifers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-06 15:11:48 +00:00
Howard Hinnant
d42c4beeff oops, forgot std::
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-04 19:56:43 +00:00
Howard Hinnant
1f970ad73a Fix up uses of new/terminate/unexpected handlers to use the new getters.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-04 19:54:11 +00:00
2 changed files with 5 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ std::get_unexpected() throw()
void
std::unexpected()
{
(*__unexpected_handler)();
(*std::get_unexpected())();
// unexpected handler should not return
std::terminate();
}
@@ -62,7 +62,7 @@ std::terminate()
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
(*__terminate_handler)();
(*std::get_terminate())();
// handler should not return
::abort ();
#ifndef _LIBCPP_NO_EXCEPTIONS

View File

@@ -36,8 +36,9 @@ operator new(std::size_t size) throw (std::bad_alloc)
{
// If malloc fails and there is a new_handler,
// call it to try free up memory.
if (__new_handler)
__new_handler();
std::new_handler nh = std::get_new_handler();
if (nh)
nh();
else
#ifndef _LIBCPP_NO_EXCEPTIONS
throw std::bad_alloc();