Boost logo

Boost :

From: Adrián Etchevarne (adrian.etchevarne_at_[hidden])
Date: 2006-05-07 16:22:14


Thorsten Ottosen wrote:

> Hi Adrian,
>
> Jeff Garland wrote:
>> Adrián Etchevarne wrote:
>>
>>>Hello boosters,
>>>
>>>I am submitting a proposal to Summer of Code of Google, and I am asking
>>>for some opinions about it.
>>>If you are intereste you can reach it at
>>>
>>>http://termovirtual.homeunix.org/~saknussemm/SoCGoogle.pdf
>>>http://termovirtual.homeunix.org/~saknussemm/SoCGoogle.ps.gz
>>
>>
>> Your URL isn't quite right -- it's missing an soc
>>
>> http://termovirtual.homeunix.org/~saknussemm/soc/SoCGoogle.pdf
Ops! Thanks Jeff.

> - if possible, prerserve the semantics of std::map<K,V>::operator[]()
> and provide throwing behavior by an at() member.
>
It's one if the options. What would be best to do? :

bimap<int, std::string> bm;

bm.from[5] = "Hello";
bm.to["Hello"] = 10; // Silently ignore or throw ?
cout << bm.from[10]; // If ignored, key not found.

Or let the user specify what behavior he wants ?

> - consider not having to/from, but to have
>
> find( const Key1& );
> find2nd( const Key2& );
> at( const Key& );
> at2nd( const Key& );
> ...
>
One of the advantages of having to/from is that you can pass them where an
associative container is expected (modulo some uses with value_type in ::to)

> etc.
>
> best regards
>
> -Thorsten

Thanks for your comments,
        Adrián Etchevarne.


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