Add a test for LWG issue #2399. We already implement this, but now we have a test as well.

llvm-svn: 222242
This commit is contained in:
Marshall Clow 2014-11-18 18:14:53 +00:00
parent 018dbf18c4
commit e1a075d5ce
1 changed files with 9 additions and 0 deletions

View File

@ -55,6 +55,9 @@ struct A
int A::count = 0;
void fn ( const std::shared_ptr<int> &) {}
void fn ( const std::shared_ptr<B> &) { assert (false); }
int main()
{
{
@ -91,4 +94,10 @@ int main()
}
}
assert(A::count == 0);
// LWG 2399
{
throw_next = false;
fn(std::unique_ptr<int>(new int));
}
}