title: how to overcome make_shared constness
body: <p>I'm faced with a problem, and can't decide what the correct solution is.</p>
  <p>Here is the code example for illustration:</p>
  <pre><code>#include &lt;boost/make_shared.hpp&gt;
  #include &lt;boost/shared_ptr.hpp&gt;
  
  class TestClass{
      public:
          int a;
          TestClass(int&amp; a,int b){};
      private:
          TestClass();
          TestClass(const TestClass&amp; rhs);
  };
  
  int main(){
      int c=4;
      boost::shared_ptr&lt;TestClass&gt; ptr;
  
  //NOTE:two step initialization of shared ptr    
  
  //     ptr=boost::make_shared&lt;TestClass&gt;(c,c);// &lt;--- Here is the problem
      ptr=boost::shared_ptr&lt;TestClass&gt;(new TestClass(c,c));
  
  }
  </code></pre>
  <p>The problem is I can't create a shared_ptr instance because of make_shared  gets and passes down arguments to TestClass constructor as <code>const A1&amp;, const A2&amp;,...</code> as documented:</p>
  <pre><code>template&lt;typename T, typename Arg1, typename Arg2 &gt;
      shared_ptr&lt;T&gt; make_shared( Arg1 const &amp; arg1, Arg2 const &amp; arg2 );
  </code></pre>
  <p>I can trick it with <code>boost::shared(new ...)</code> or rewrite the constructor for <code>const</code> references, but that doesn't seem like the right solution.</p>
  <p>Thank you in advance!</p>