Question: I was reading [C++11 Faq](http://www.stroustrup.com/C++11FAQ.html) and came across this code. I have a better understanding of C++ coding, but I'm still not able to understand the below code.

```
    template<class T>
    class Handle {
        T* p;
    public:
        Handle(T* pp) : p{pp} {}
        ~Handle() { delete p; } // user-defined destructor: no implicit copy or move 

        Handle(Handle&& h) :p{h.p} { h.p=nullptr; };    // transfer ownership
        Handle& operator=(Handle&& h) { delete p; p=h.p; h.p=nullptr; return *this; }   // transfer ownership

        Handle(const Handle&) = delete;     // no copy
        Handle& operator=(const Handle&) = delete;

        // ...
    };

```

* What does "transfer ownership" mean?
* Why is the copy ctor equated to "`delete`"? how is it useful?

Please if someone can add a few examples with explanation, it would be a great help.

Answer: 
It's a move constructor, the special `&&` syntax introduced in C++11 takes a rvalue reference, so a reference to a variable which has no name and can't be referenced anywhere else inside the code.

What happens in the constructor is that the `Handle` takes the ownership of the `Handle` passed through the move constructor in the way that it *steals* (pass me the term) the `T* p` inside by assigning its value to its own variable and then setting `nullptr` to the variable of the rvalue passed.

This is used because you don't really need to copy an rvalue, since that value won't be used anymore in the code, so it's safe to just take its data, this avoids a, possibly costly, copy constructor.
about your second question:
Why is the copy ctor equated to "delete"? how is it useful?

Here is an answer:
<http://www.developerfusion.com/article/133063/constructors-in-c11/>

> 
> C++11 Explicitly Deleted Constructors
> 
> 
> C++11 also supports the concept of explicitly deleted constructors.
>  For example, you can define a class for which you do not want to write
>  any constructors and you also do not want the compiler to generate the
>  default constructor. In that case you need to explicitly delete the
>  default constructor:
> 
> 
> class MyClass { public: 
>  MyClass() = delete; };
> 
> 
>