I am trying to create a wrapper class for the std::unique\_ptr, for now it just needs to support the basic operations for the unique\_ptr, but in the future this would have more functionalities.

```
template<typename T>
class Unique {
public:
    Unique(std::nullptr_t) { pointer = nullptr; }
    template<typename ...Args>
    Unique(Args&&... args) { pointer = std::make_unique<T>(std::forward<Args>(args)...); }

    T operator*() const { return *pointer.get(); }
    T* operator->() const { return pointer.get(); }

    // operator=() ?
private:
    std::unique_ptr<T> pointer;
};

```

Doing `Unique<Foo> foo()` works just fine, but the problem happens when I try to do `Unique<Foo> bar = foo`, a compiler error happens saying

```
error: no matching function for call to ‘Foo::Foo(Unique\<Foo\>&)’ { return unique\_ptr<\_Tp>(new \_Tp(std::forward<\_Args>(\_\_args)...)); }

```

How can I define a `operator=` to make this work?