Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-06-03 05:57:22


Thorsten Ottosen skrev:
> Rodolfo Lima skrev:
>> Hi, I'd like to know why there's no method 'insert' that mimicks stl's
>> associative container's insert method that accepts an iterator that
>> points to where the value could be placed, and the value?
>>
>> Regards,
>> rod
>
> Was it ptr_map you got this problem with? For some reason I forgot to
> add the overloads to ptr_map, but not to ptr_set.

The problem is that there is no exception-safe way to pass around
pair<key,T*>. The only alternative would be to add

iterator insert( iterator, ref_pair<key,T*> ).

such that we can insert an element from another ptr_map.

Would this be satisfactory?

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net