Implement move semantics for my own std::vector
<p>How do I implement move schematics for std::vector given the internal fields data, size and capacity?
How can I make this thread safe?</p>

<pre><code>#include &lt;utility&gt;

class vec {
public: 
    vec(vec&amp;&amp; o) : size(o.size), capacity(o.capacity), data(std::move(o.data))
    {}

    vec&amp; operator=(vec&amp;&amp; o)
    {
        if (this != &amp;o) {
            size = o.size;
            capacity = o.capacity;
            delete[] data;
            data = o.data;
            o.data = nullptr;
        }
        return *this;
    }

    vec(vec&amp;) = delete;                         // disable copying
    vec&amp; operator=(vec&amp;) = delete;  
    vec&amp; operator=(vec&amp;) const = delete;

    int* data;
    size_t size;
    size_t capacity;
};
</code></pre>