title: what "default definition would be ill-formed" means?
body: <p>Im a begginer on c++, im try to creat an object but im getting an error, and i dont understand what wrong. this is my hpp file + cpp file when im getting the error: </p>
  
  <pre><code>Manager::Manager(const Manager &amp;manager ) :
  Worker(manager.name,manager.id,manager.salary){
     this-&gt;workers=manager.workers;
  }
  
  class Manager:public Worker {
      private:
      std::vector&lt;Worker&gt; workers;         
      public:
          Manager(const char* name, int id, int salary);
          Manager(const Manager &amp;manager );      
  };
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>In file included from Manager.hpp:5:0,
                   from Manager.cpp:1:
  Worker.hpp:7:7: note: ‘Worker&amp; Worker::operator=(const Worker&amp;)’ is implicitly deleted because the default definition would be ill-formed:
   class Worker{
  </code></pre>
  
  <p>but when im doing this it workes: </p>
  
  <pre><code>Manager::Manager(const Manager &amp;manager ) :
      Worker(manager.name,manager.id,manager.salary), workers(manager.workers){
                 }
  </code></pre>
  
  <p>someone can tell me why? </p>
  
  <hr>
  
  <p>edit:</p>
  
  <p>this is the worker class code:</p>
  
  <p>this is worker.hpp</p>
  
  <pre><code>  class Worker{
          protected:
              const std::string name;
              const int id;
              int salary;
  
          public:
              Worker(const std::string&amp; name, int id, int salary);
              Worker(const Worker&amp; worker );
      };
  </code></pre>
  
  <p>this is worker.cpp:</p>
  
  <pre><code>#include "Worker.hpp"
  
  Worker::Worker(const std::string &amp;names, int ids, int salarys) :
  name(names), id(ids), salary(salarys)
  {
  }
  
  Worker::Worker(const Worker &amp;worker): 
  name(worker.name), id(worker.id), salary(worker.salary)
  {
  
  }
  
  Worker::~Worker() {
  
  }
  
  std::string Worker::toString(){
      std::string s="Worker id:" + id ;
      return s;
  }
  </code></pre>