title: How can i cast between void* and boost shared ptr
body: <p>I've got these lines:</p>
  
  <pre><code>typedef boost::shared_ptr&lt;A&gt; A_SPtr;
  void *f(void* var){ ...
  </code></pre>
  
  <p>and i want to be able to do something like this:</p>
  
  <pre><code>A_SPtr instance = (void*)(var);
  </code></pre>
  
  <p>how can i do it? 
  Also, how can i cast the other way around meaning from the shared_ptr to void*?</p>