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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222242 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2014-11-18 18:14:53 +00:00
parent 9a4997ba29
commit 7683fe2b7a

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));
}
}