diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp
index 03747b4f89cf..5088a4410e79 100644
--- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp
+++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move01.pass.cpp
@@ -32,22 +32,6 @@ struct A
int A::count = 0;
-class NCDeleter
-{
- int state_;
-
- NCDeleter(NCDeleter&);
- NCDeleter& operator=(NCDeleter&);
-public:
-
- NCDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(A* p) {delete [] p;}
-};
-
int main()
{
{
@@ -71,10 +55,10 @@ int main()
}
assert(A::count == 0);
{
- NCDeleter d;
- std::unique_ptr s(new A[3], d);
+ NCDeleter d;
+ std::unique_ptr&> s(new A[3], d);
A* p = s.get();
- std::unique_ptr s2 = std::move(s);
+ std::unique_ptr&> s2 = std::move(s);
assert(s2.get() == p);
assert(s.get() == 0);
assert(A::count == 3);
diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
index ef821a915e44..5720d3bd288f 100644
--- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
+++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp
@@ -31,21 +31,6 @@ struct A
int A::count = 0;
-class NCDeleter
-{
- int state_;
-
- NCDeleter(NCDeleter&);
- NCDeleter& operator=(NCDeleter&);
-public:
-
- NCDeleter() : state_(5) {}
-
- int state() const {return state_;}
- void set_state(int s) {state_ = s;}
-
- void operator()(A* p) {delete [] p;}
-};
std::unique_ptr
source1()
@@ -67,14 +52,14 @@ void sink2(std::unique_ptr > p)
{
}
-std::unique_ptr
+std::unique_ptr&>
source3()
{
- static NCDeleter d;
- return std::unique_ptr(new A[3], d);
+ static NCDeleter d;
+ return std::unique_ptr&>(new A[3], d);
}
-void sink3(std::unique_ptr p)
+void sink3(std::unique_ptr&> p)
{
}