title: Using copy constructor in assignment operator
body: <p>Is it against style guidelines to use the copy-constructor in the assignment operator? I.e.:</p>
  
  <pre><code>const Obj &amp; Obj::operator=(const Obj &amp; source)
  {
      if (this == &amp;source)
      {
          return *this;
      }
  
      // deep copy using copy-constructor
      Obj * copy = new Obj(source);
  
      // deallocate memory
      this-&gt;~Obj();
  
      // modify object
      *this = *copy;
  
      return *copy;
  }
  </code></pre>
  
  <p>Assuming that the copy-constructor performs a deep copy on the object.</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>My code is extremely erroneous, as commenters have pointed out.</p>
  
  <p>As for the overall conceptual question: as WhozCraig suggested, the copy/swap idiom seems to be the way to go: <a href="https://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom">What is the copy-and-swap idiom?</a></p>