Boost logo

Boost :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2005-12-12 10:14:28


Peter Dimov wrote:
> Yuval Ronen wrote:
>
>>Hi.
>>I wondered what the reason that there is a 'operator=(auto_ptr<Y>&)'
>>but there isn't any 'void reset(auto_ptr<Y>&'. This seems to me as
>>asymmetry.
>>
>>At first I thought the reason that reset(Y*) is supplied instead of
>>operator=(Y*), is that Y* assignment needs to be explicit (as the
>>constructor is explicit) and operator= doesn't allow explicity (is
>>there
>>such a word?). But if this assumtion is correct, then there is
>>contradiction between the constructor for auto_ptr, which is explicit,
>>and the operator= for auto_ptr, which is not explicit. Am I talking
>>nonsense?
>
>
> No, you make a lot of sense, and reset(auto_ptr&) indeed seems more
> consistent than operator=. But it's too late to change that now. :-)

Then I guess I'll have to live with it... :-)


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