title: shared_ptr initialization
body: <p>A member is defined as</p>
  
  <pre><code>std::shared_ptr&lt;std::array&lt;std::string, 6&gt; &gt; exit_to;
  </code></pre>
  
  <p>which points to additional data shared among others.
  When try to initiate the pointer "exit_to". The correct way is</p>
  
  <pre><code>node_knot.exit_to = std::make_shared&lt;std::array&lt;std::string, 6&gt; &gt;();
  </code></pre>
  
  <p>But it's in another file and I'd like to keep the pointer type consistent, something like this:</p>
  
  <pre><code>node_knot.exit_to = std::make_shared&lt;decltype(*node_knot.exit_to)&gt;();
  </code></pre>
  
  <p>But won't compile:</p>
  
  <pre><code> /usr/include/c++/4.6/bits/shared_ptr_base.h:798:54: error: '__p'
   declared as a pointer to a reference of type
   'std::array&lt;std::basic_string&lt;char&gt;, 6&gt; &amp;'
           __shared_ptr(const __shared_ptr&lt;_Tp1, _Lp&gt;&amp; __r, _Tp* __p)
                                                               ^ /usr/include/c++/4.6/bits/shared_ptr.h:93:31: note: in instantiation
   of template class
   'std::__shared_ptr&lt;std::array&lt;std::basic_string&lt;char&gt;, 6&gt; &amp;, 1&gt;'
   requested here
       class shared_ptr : public __shared_ptr&lt;_Tp&gt;
                                 ^ ../node_booker.h:757:20: note: in
   instantiation of template class
   'std::shared_ptr&lt;std::array&lt;std::basic_string&lt;char&gt;, 6&gt; &amp;&gt;' requested
   here
                                                           n.exit_to = std::make_shared&lt;decltype(*n.exit_to)&gt;();
  </code></pre>
  
  <p>I'm under Ubuntu 12.10, clang++ 3.2, with --std=c++11</p>