<rdar://problem/9073695> std::uncaught_exception() becomes true before evaluating the throw-expression rather than after

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@127499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Kledzik 2011-03-11 22:33:07 +00:00
parent d0a2fbfe60
commit 770a3c5116

View File

@ -20,13 +20,22 @@ struct A
}
};
struct B
{
B()
{
// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#475
assert(!std::uncaught_exception());
}
};
int main()
{
try
{
A a;
assert(!std::uncaught_exception());
throw 1;
throw B();
}
catch (...)
{