Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-30 12:47:05


From: "David Abrahams" <dave_at_[hidden]>
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
> > It's fairly easy to provide a get_pointer for std::auto_ptr. ;-)
>
> One that works for regular pointers as well, and works on msvc6? I'd
> love to see that!

Now I'm not sure what you mean.

namespace boost
{
    template<class T> T * get_pointer(T * p) { return p; }
    template<class T> T * get_pointer(std::auto_ptr<T> const & p) { return
p.get(); }
}


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