title: Class with no pointer data members- copy constructor == assignment operator?
body: <p>If your class does not have any data members declared using pointers, does the copy constructor always contain the same code as the assignment operator? and if not, why not?</p>
  
  <p>EDIT think I need some code to explain what I mean:</p>
  
  <pre><code>class A{
  public:
      A();
      A(const A&amp; a);
      A&amp; operator=(const A&amp; a);
  
  private:
      int a;
      double b;
  };
  
  //Copy constructor
  A::A(const A&amp; src){
      a = src.a;
      b = src.b;
  }
  
  //Assignment operator
  A&amp; A::operator=(const A&amp; src){
      //Because none of the data members are pointers- the code in here 
      //would be the same as the copy constructor?
  
      //Could I do:
      a = src.a;
      b = src.b;
      //?
  }
  </code></pre>