title: C++ default move assignment operator cannot be invoked on class even if class has no constructors defined
body: <p>While I was making myself familliar with C++14 specification, I have read that, if a class has no explicitly declared Copy Constructor, Copy Assignment Operator, Move Constructor nor Move Assignment Operator, default implementations should be generated by the compiler.</p>
  
  <p>Consider this empty class for thread safe files:</p>
  
  <pre><code>class ThreadSafeFile
  {
      std::mutex m_mutex;
      std::string m_FileName;
      std::ofstream m_File;
  };
  </code></pre>
  
  <p>When I try to move assign it like this:</p>
  
  <pre><code>ThreadSafeFile file;
  
  ThreadSafeFile file2 = std::move(file);
  </code></pre>
  
  <p>I am getting this compilation error:</p>
  
  <blockquote>
    <p>function "ThreadSafeFile::ThreadSafeFile(const ThreadSafeFile &amp;)" (declared implicitly) cannot be referenced -- it is a deleted function</p>
  </blockquote>
  
  <p>Why is that so?</p>