Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-03-29 19:16:41

David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>> David Abrahams wrote:
>>> David Abrahams <dave_at_[hidden]> writes:
>>>> Unfortunately for this particular facility, the converting
>>>> constructor is explicit, so you can't do
>>>> f(new_<T>(a, b, c))
>>>> if f takes a shared_ptr<T>.
>>> I just realized we could probably fix this by removing an "explicit"
>>> from the ctor that accepts an rvalue auto_ptr. What about that,
>>> Peter? This seems like a poster child for rvalue distinction!
>> Done.
> Cool! Just in case it wasn't obvious: we should do this across all
> the smart pointers. It looks like scoped_ptr could use the same
> treatment, for example.

scoped_ptr already takes its auto_ptr argument by value, so it doesn't need
a separate rvalue overload. There should be no need to make the constructor
implicit since a scoped_ptr cannot be used as a function argument because of
its noncopyability.

Boost list run by bdawes at, gregod at, cpdaniel at, john at