Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-03-20 08:10:24


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?

Thanks

-Thorsten

-- 
Thorsten Ottosen
----------------------------
www.dezide.com
www.cs.aau.dk/index2.php?content=Research/bss
www.boost.org
www.open-std.org/JTC1/SC22/WG21/ 

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