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:
		@@ -55,6 +55,9 @@ struct A
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int A::count = 0;
 | 
					int A::count = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void fn ( const std::shared_ptr<int> &) {}
 | 
				
			||||||
 | 
					void fn ( const std::shared_ptr<B> &) { assert (false); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main()
 | 
					int main()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -91,4 +94,10 @@ int main()
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    assert(A::count == 0);
 | 
					    assert(A::count == 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // LWG 2399
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    throw_next = false;
 | 
				
			||||||
 | 
					    fn(std::unique_ptr<int>(new int));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user