Boost logo

Boost :

Subject: Re: [boost] [ptr_container] Questionable strong guarantee of ptr_map::insert()
From: Kazutoshi Satoda (k_satoda_at_[hidden])
Date: 2009-08-22 06:18:49

Thorsten Ottosen wrote:
> Kazutoshi Satoda skrev:
>> 1. (Type: Bugs)
>> False strong guarantee in ptr_container documentation
> Right, it should be replaced with the basic guarantee and a note saying
> the object is deleted when an exception is thrown.

Putting "basic guarantee" seems over relaxing. One should be able to
assume the contents of the container are unchanged when an exception is

I propose the wording like this; "When an exception is thrown, nothing
happens except performing delete x."

>> 2. (Type: Feature Requests)
>> Provide strong guaranteed overloads in ptr_container
> Hm. Do you propose to break the existing interface?

Yes, I personally believe that the following use should be banned by
>> map.insert(some_key(...), std::auto_ptr<value>(new value));

And I agree with this practice.
> People need to initialize smart pointers in seperate statements.

I want to hear about some compatibility policy in Boost to guess the
possibility of this kind of breaking (but otherwise good) changes.


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