Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-06-08 17:57:32


Konstantin Litvinenko wrote:
> Hello, Thorsten!
> You wrote on Wed, 07 Jun 2006 00:58:55 +0200:
>
> TO> If you're not afraid of using the main cvs, I can update that.
>
> I use 1.33.1 and can't switch to main trunc.
>
> TO> Do you agree that for ptr_set/ptr_map the return value should be
> TO> single object transfer: std::pair<iterator,size_type>
>
> Why not std::pair<iterator,bool> as std::set/std::map return?
>
> TO> multi object transfer: std::pair<iterator,size_type>
>
> May be only size_type?

Why do you need the iterator for single element transfer, but not for
multi element transfer?

> TO> and for ptr_multiset/ptr_multimap the return value should be the same
> TO> too?
>
> I think for these two should be
>
> single object transfer: iterator // this operation always insert key/value pair
> multi object transfer: void // this operation always insert all key/value pairs

I have come to dislike variations in return-type, even for different
containers. It makes them less interchangeable. Do you disagree?

-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