title: C++ modifying const pointer reference value
body: <p>I've encountered similar code piece today and it got me wondering. I did a little experiment myself as shown below.</p>
  <p>Why does the first <code>stuff</code> function with shared pointer allow to modify the value while seconds one doesn't?</p>
  <pre><code>#include &lt;memory&gt;
  
  void stuff(const std::shared_ptr&lt;int&gt; &amp;var)
  {
      *var = 5;
  }
  
  void stuff(const int* &amp;var)
  {
      *var = 5;
  }
  
  int main()
  {
      auto a = std::make_shared&lt;int&gt;();
      stuff(a);
  
      int* b;
      stuff(b);
  
      return 0;
  }
  </code></pre>