<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:
parent
d0a2fbfe60
commit
770a3c5116
@ -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 (...)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user