
David Abrahams <dave@boost-consulting.com> writes:
David Abrahams <dave@boost-consulting.com> writes:
We probably ought to define a public referent<T> metafunction in namespace boost which implements that logic, so that people can specialize it.
That's done; the docs still need to be updated to reflect that fact though.
Alright! So I can now specialize boost::referent for my own smart pointer template: namespace boost { template<class T> struct referent<utils::weak_ptr<T> > { typedef T type; }; } Really seems a bit weird that boost::referent wasn't already invented in the type_traits portion of the library, since it can be applied to any kind of pointer, iterator, etc... Anyway, it has neatened up my code quite a bit, thanks. -- Raoul Gough "Let there be one measure for wine throughout our kingdom, and one measure for ale, and one measure for corn" - Magna Carta