From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-03-17 13:11:27
"Felipe Magno de Almeida" <felipe.almeida_at_[hidden]> wrote in message
| I dont see why ptr_map throws in operator, I think it should have the
| same behavior of std::map and return a default constructed object in
| case it doesnt find the key.
| Anyway, it is just a opinion
Hm..yeah...I guess you can use
map.at( "foo" );
if you want the exception to be thrown. I think you're right
it should call insert a heap-allocated object.
I will change this for the post-review. In the meantime, you can make
a new function in ptr_map_adapter using lookup()
as a template to get the behavior you need.
| Im using ptr_map in production code and
I'm glad to hear that.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk