// should be friend of boost::exception and error_info_container_impl template bool boost :: operator >> (const E & e, shared_ptr & ptr) { if (exception_detail::error_info_container_impl * i = dynamic_cast (e.data_.get())) for (exception_detail::error_info_container_impl::error_info_map::iterator ii = i->info_.begin(); ii != i->info_.end(); ++ii) if (ptr = dynamic_pointer_cast (ii->second)) return i->info_.erase (ii), true; return false; }