Boost logo

Boost :

Subject: [boost] [smart ptr] implicit auto_ptr r-value initialization for scoped_ptr?
From: Jason Moore (jason.moore_at_[hidden])
Date: 2009-01-07 16:50:33


This is absolute genius!!! (i.e. implicit only for r-values of type
std::auto_ptr<T>)

std::auto_ptr<T> Create();
...
if (boost::shared_ptr<T> my_ptr = Create())
{
  my_ptr->doIt();
}

Why is this feature not provided for boost::scoped_ptr?

Thanks,
Jason Moore


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