From 3481cdc57382b315c96ad82a6e166f9914dadddb Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 9 Nov 2013 05:55:03 +0000 Subject: Switch to allow implicit construction. In many cases, we're wrapping a derived type and this makes it *much* easier to write this code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194321 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/polymorphic_ptr_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'unittests') diff --git a/unittests/ADT/polymorphic_ptr_test.cpp b/unittests/ADT/polymorphic_ptr_test.cpp index d9a2c3f..fbe60df 100644 --- a/unittests/ADT/polymorphic_ptr_test.cpp +++ b/unittests/ADT/polymorphic_ptr_test.cpp @@ -113,6 +113,11 @@ TEST(polymorphic_ptr_test, Polymorphism) { copy = dummy_copy(b); EXPECT_NE(b, copy); EXPECT_EQ("DerivedB", copy->name()); + + // Test creating a copy out of a temporary directly. + copy = dummy_copy >(new DerivedA()); + EXPECT_NE(a, copy); + EXPECT_EQ("DerivedA", copy->name()); } } -- cgit v1.1