
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 thrown. 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 design.
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. -- k_satoda