title: Issue with copy constructor of a templated derived class
body: <p>I have templated parent and child classes and want to define the copy constructor for the child class that uses the functions from the parent class as follows.</p>
  <pre><code>#include&lt;vector&gt;
  #include &lt;iostream&gt;
  
  template &lt;typename T&gt;
  class Parent {
  public:
      Parent() {};
      std::vector&lt;T&gt;&amp; getDims() { return m_dims; };
      void setDims(const std::vector&lt;T&gt; dims) { m_dims = dims; };
      // Copy constructor
      Parent(const Parent&amp; p) { m_dims = p.getDims(); }
  private:
      std::vector&lt;T&gt; m_dims;
  };
  
  template &lt;typename T&gt;
  class Child : public Parent&lt;T&gt; {
  public:
      Child() {};
      std::vector&lt;T&gt;&amp; getCenter() { return m_center; };
      void setCenter(const std::vector&lt;T&gt; center) { m_center = center; };
      // Copy constructor
      Child(const Child&amp; c) {
          this-&gt;setDims(c.getDims());
          m_center = c.getCenter();
      }
  private:
      std::vector&lt;T&gt; m_center;
  };
  
  int main(){
      Child&lt;int&gt; child1;
      child1.setDims({3, 1, 1, 1}); // Parent function
      child1.setCenter({1, 2, 3, 4}); // Child function
  
      Child&lt;int&gt; child2 = child1;
  
      return 0;
  }
  </code></pre>
  <p>The compiler gives me the following error on the <code>Child</code> copy constructor:</p>
  <pre><code>error: passing 'const Child&lt;int&gt;' as 'this' argument discards qualifiers 
  </code></pre>
  <p>Could someone kindly help me out?</p>