title: Type erasure in C++: how boost::shared_ptr and boost::function work?
body: <p>Type erasure - is that how you call it?</p>
  
  <p>How <code>boost::shared_ptr</code> stores its deleter and how <code>boost::function</code> stores its function object?</p>
  
  <p>Is there any tutorial that teaches the trick?</p>
  
  <p>What is the run-time cost of using type-erased function objects?</p>