"Johan Nilsson" <[EMAIL PROTECTED]> writes: > I'd like to be able to store references to objects of arbitrary types in a > homogenous collection, not requiring them to be derived from a common base > class. For COM users, that would be something like an "IUnknown in the > context of standard C++". I suspect that boost::any might be something > similar to what I need, but I just got that idea using void pointers. > >> Incidentally, shared_ptr<void> may allow you the kind of type erasure >> you want. Just a thought... >> > > I' afraid I don't really follow you. Wouldn't shared_ptr<void> choke on > trying to delete through a void pointer?
No it won't; it's perfectly suited to the application you cite. Check out the documentation. HTH, -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost