//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <memory>

// unique_ptr

// Test unique_ptr default ctor

// default unique_ptr ctor should require default Deleter ctor

#include <memory>

class Deleter
{

    Deleter() {}

public:

    Deleter(Deleter&) {}
    Deleter& operator=(Deleter&) { return *this; }

    void operator()(void*) const {}
};

int main()
{
    std::unique_ptr<int[], Deleter> p;
}

//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <memory>

// unique_ptr

// Test unique_ptr default ctor

// default unique_ptr ctor should require default Deleter ctor

#include <memory>

class Deleter
{

    Deleter() {}

public:

    Deleter(Deleter&) {}
    Deleter& operator=(Deleter&) {}

    void operator()(void*) const {}
};

int main()
{
    std::unique_ptr<int[], Deleter> p;
}

--- 
+++ 
@@ -25,7 +25,7 @@
 public:
 
     Deleter(Deleter&) {}
-    Deleter& operator=(Deleter&) {}
+    Deleter& operator=(Deleter&) { return *this; }
 
     void operator()(void*) const {}
 };
Add return statement to a test class's assignment operator. Defect found by Coverity Scan.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@216317 91177308-0d34-0410-b5e6-96231b3b80d8
