title: Constructor for `const` object
body: <p>Consider this code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  class test
  {
  public:
      test( char *arg )
      :   _arg( arg )
      {}  
      char *_arg;
  };
  
  int main( )
  {
      char *txt1       = "Text one";  // Ignore this warning.
      const char *txt2 = "Text two";
  
      test       t1( txt1 );  // Normal case, nothing new.
      const test t2( txt2 );  // Since object is const, I'd like to be able to pass a const argument in.
  }
  </code></pre>
  
  <p>It blows up with the error:</p>
  
  <pre><code>error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     const test t2( txt2 );
  </code></pre>
  
  <p>Then I tried to add a second constructor to test whether the compiler could select the right one for <code>t2</code>, my <code>const</code> object:</p>
  
  <pre><code>    test( const char *arg )
      :   _arg( arg )
      {}  
  </code></pre>
  
  <p>but then the error is:</p>
  
  <pre><code>error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
    : _arg( arg )
  </code></pre>
  
  <p>So declaring my object as <code>const</code> does not make its fields <code>const</code> as well.</p>
  
  <p>How to properly declare my class constructors so that it can handle <code>const</code> and non-const object creation?</p>