Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-05-07 12:41:38


Jeff Garland wrote:
> Thorsten Ottosen wrote:

>>- I would srongly consider making the interface a refinement of std::map
>>to allow drop in-replacement, and to minimize surprises for people
>>
>>- Letting operator[]() work with Key1 and Key2 seems like a bad thing:
>>what if the types are the same? What if the types are implicitly
>>convertible to eachother (seems error-prone).
>
>
> It seems like a nice convenience in the case where the key and the value
> are different. I think it would be fine if it's documented in bold
> print in the docs. Certainly it creates is for the cut/paste programmers
> that just try to follow an existing example with different key types and
> then change it to be the same.
>

My concerns where also with keys that can be *implicitly* converted
to eachother, say, int and unsigned.

> 1) change name of mbimap_one_to_many --> perhaps multi_bimap_1_to_m

FWIW, I think bimap and bimultimap make a good basis. This would allow
for bimap_1_to_m and bimultimap_1_to_m

-Thorsten


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