|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-20 09:48:55
Thorsten Ottosen wrote:
> "Peter Dimov" <pdimov_at_[hidden]> wrote in message
> news:003e01c52d52$42ddfda0$6501a8c0_at_pdimov2...
>> Thorsten Ottosen wrote:
>>> Is there any reason address_of is not defined for shared_ptr,
>>> scoped_ptr etc.?
>>
>> I've no idea what you mean, sorry.
>
>
> well, currently I have to do
>
> T* = &*ptr;
>
> to get the address.
#include <boost/get_pointer.hpp>
void f( Sp ps )
{
using boost::get_pointer;
typename pointee<Sp>::type * pt = get_pointer( ps );
}
HTH
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk