Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-20 08:41:54


Thorsten Ottosen wrote:
> Hi,
>
> I need some kind of traits for my indirect_fun class if it should be
> usable with smart pointers.
>
> I imagined some like
>
> template< class T >
> struct pointer_value
> {
> typedef BOOST_DEDUCED_TYPENAME remove_pointer<T>::type type;
> };
>
> template< class T, class D >
> struct pointer_value< shared_ptr<T,D> >
> {
> typedef T type;
> };
>
> etc.
>
> Any thoughts?

<boost/pointee.hpp>, one of the many undocumented Boost headers. :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk