[except.nested]

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-05-27 17:06:52 +00:00
parent ebef7459b2
commit ed2c2916b2
8 changed files with 512 additions and 0 deletions

View File

@@ -142,6 +142,23 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other)
#endif
}
nested_exception::nested_exception()
: __ptr_(current_exception())
{
}
nested_exception::~nested_exception()
{
}
void
nested_exception::rethrow_nested /*[[noreturn]]*/ () const
{
if (__ptr_ == nullptr)
terminate();
rethrow_exception(__ptr_);
}
} // std