title: Is it possible to define an std::thread and initialize it later?
body: <p>My aim is to keep an <code>std::thread</code> object as data member, and initialize it when needed.<br>
  I'm not able to do this (as in my code below) because the copy constructor of the <code>std::thread</code> class is deleted. Is there any other way to do it?</p>
  
  <pre><code>class MyClass
  {
      public:
          MyClass():DiskJobThread(){};
          ~MyClass();
  
          void DoDiskJobThread();
  
      private:
          int CopyThread(const std::wstring &amp; Source, const std::wstring &amp; Target);
          int MoveThread(const std::wstring &amp; Source, const std::wstring &amp; Target);
          std::thread DiskJobThread;
  };
  
  MyClass::~MyClass()
  {
      DiskJobThread.join();
  }
  
  void MyClass::DoDiskJobThread()
  {
      std::wstring Source = GetSource();
      std::wstring Target = GetTarget();
      int m_OperationType = GetOperationType();
      if      (m_OperationType == OPERATION_COPY)
      {
          DiskJobThread = std::thread(&amp;MyClass::CopyThread, *this, Source, Target);
      }
      else if (m_OperationType == OPERATION_MOVE)
      {
          DiskJobThread = std::thread(&amp;MyClass::MoveThread, *this, Source, Target);
      }
  }
  </code></pre>