Re: [boost] Another proposal for Bimap and Boost.MultIndex

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.
participants (1)
-
Adrián Etchevarne