[libcxx] r222242 - Add a test for LWG issue #2399. We already implement this, but now we have a test as well.
Marshall Clow
mclow.lists at gmail.com
Tue Nov 18 10:14:53 PST 2014
Author: marshall
Date: Tue Nov 18 12:14:53 2014
New Revision: 222242
URL: http://llvm.org/viewvc/llvm-project?rev=222242&view=rev
Log:
Add a test for LWG issue #2399. We already implement this, but now we have a test as well.
Modified:
libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
Modified: libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp?rev=222242&r1=222241&r2=222242&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp (original)
+++ libcxx/trunk/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp Tue Nov 18 12:14:53 2014
@@ -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));
+ }
}
More information about the cfe-commits
mailing list