title: Copy constructor
body: <p>In class of this design:  </p>
  
  <pre><code>class X
  {
      X* left_;
      X* right_;
      X(const X&amp;)
  };
  </code></pre>
  
  <p>when trying to implement cpy ctor I'm getting into loop:  </p>
  
  <pre><code>X::X(const X&amp; pattern)
  {
      if (this != &amp;pattern)
      {
          left_ = new X(*pattern.left_);//this is the line
      }
  }
  </code></pre>
  
  <p>As a solution to that I'm thinking of using memcpy + operator new() fnc, but is there better way to do it? </p>