title: Why should I delete move constructor and move assignment operator in a singleton?
body: <p>I have the following Singleton policy-class implementation:</p>
  
  <pre><code>template &lt;typename T&gt;
  class Singleton
  {
      Singleton(){}; // so we cannot accidentally delete it via pointers
      Singleton(const Singleton&amp;) = delete; // no copies
      Singleton&amp; operator=(const Singleton&amp;) = delete; // no self-assignments
      Singleton(Singleton&amp;&amp;) = delete; // WHY?
      Singleton&amp; operator=(Singleton&amp;&amp;) = delete; // WHY?
  public:
      static T&amp; getInstance() // singleton
      {
          static T instance; // Guaranteed to be destroyed.
                         // Instantiated on first use.
                         // Thread safe in C++11
          return instance;
      }
  };
  </code></pre>
  
  <p>which I then use via the curiously recurring template pattern (CRTP)</p>
  
  <pre><code>class Foo: public Singleton&lt;Foo&gt; // now Foo is a Singleton
  {
      friend class Singleton&lt;Foo&gt;;
      ~Foo(){}
      Foo(){};
  public:
  // rest of the code
  };
  </code></pre>
  
  <p>I cannot figure out why I should delete the move constructor and assignment operator. Can you give me a single example where I end up breaking the singleton if I don't delete (don't define at all) the move ctor and assignment operator? </p>