From 7683fe2b7a296de79cca0995c9ca9b35fdc0dcb1 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 18 Nov 2014 18:14:53 +0000 Subject: [PATCH] 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 --- .../util.smartptr.shared.const/unique_ptr.pass.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp index d3b28598..dc2a6afe 100644 --- a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +++ b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp @@ -55,6 +55,9 @@ struct A int A::count = 0; +void fn ( const std::shared_ptr &) {} +void fn ( const std::shared_ptr &) { assert (false); } + int main() { { @@ -91,4 +94,10 @@ int main() } } assert(A::count == 0); + + // LWG 2399 + { + throw_next = false; + fn(std::unique_ptr(new int)); + } }