title: passing smart pointer to a function taking reference to a pointer parameter
body: <p>How can I pass smart ptr to a function taking reference to a pointer as a parameter?</p>
  
  <pre><code>smart_ptr&lt;T&gt; val; // I have this smart pointer
  
  // And I want to pass it to this function, so that this function will fill the smart pointer with proper value
  void Foo(T*&amp; sth)
  {
      sth = memoryAddress;
  }
  </code></pre>
  
  <p>EDIT
  Now I get it. Thanks guys for all the answers!</p>