Canonical Implementation of Move Semantics I am trying to compose an illustrative example which shows how to implement move semantics on an object that will be stored in a vector.

Please consider the following code, which is my illustrative example so far. It is designed to be a canonical, pedantically correct implementation of an object that implements move semantics, does not implement copy semantics, and can be stored in a vector&lt;&gt; (Where T is Moveable, below). How did I do?

#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;list&gt;
#include &lt;algorithm&gt;
#include &lt;memory&gt;
#include &lt;iterator&gt;
using namespace std;

class Moveable
{
public:
    string foo_;
    string bar_;

    Moveable(Moveable&amp;&amp; rhs) : foo_(std::move(rhs.foo_)), bar_(std::move(rhs.bar_)) {}  // move construction
    Moveable(const string&amp; foo) : foo_(foo) {};             // convert construction
    Moveable&amp; operator=(Moveable&amp;&amp; rhs)     // move assignment
    {
        foo_ = std::move(rhs.foo_);
        bar_ = std::move(rhs.bar_);
        return * this;
    }
private:
    Moveable(const Moveable&amp;);              // not defined, not copy-constructible
    Moveable&amp; operator=(const Moveable&amp;);   // not defined, not copy-assignable
    Moveable();                             // not defined, not default constructible
};

Moveable generate_it()
{
    static string foo ;
    if( foo.empty() || foo[0] == 'z' )
        foo.insert(0, 1, 'a');
    else
        foo[0]++;
    return foo;
}

int main()
{
    typedef vector&lt;Moveable&gt; Moveables;
    Moveables v;
    generate_n(back_inserter(v), 1024, &amp;generate_it);
    cout &lt;&lt; v.size() &lt;&lt; endl;
    string target = "zzz";
    auto that = find_if(v.begin(), v.end(), [target](const Moveables::value_type&amp; it) -&gt; bool
    {
        return it.foo_ == target;
    });

    if( that != v.end() )
        v.erase(that);

    sort(v.begin(), v.end(), [](const Moveables::value_type&amp; lhs, const Moveables::value_type&amp; rhs) -&gt; bool
    {
        return lhs.foo_ &gt; rhs.foo_;
    });
    cout &lt;&lt; v.size() &lt;&lt; endl;
}
One small error: Mark the move constructor as noexcept, otherwise there are situations where it won’t be used. The linked case is different since the class has a copy-constructor, yet I can imagine that there are still situations where it matters, especially since your copycon isn’t deleted, just private and undefined.
Why is the destructor virtual? If the example is supposed to be minimal then this might be distracting.
In generate_it:

return std::move(Moveable(foo));


The std::move here is redundant, since you are returning a temporary. What’s more, the explicit constructor call is redundant too, since the constructor isn’t marked as explicit. Just return foo; will do.
The find_if call could be replaced by vanilla find, using temporary construction again:

auto that = find(v.begin(), v.end(), target);

Finally, in the sort call, why aren’t the arguments declared const&amp;? Granted, makes the line even longer as it stands this is inconsistent with the const-correctness illustrated in the find_if call.