Is there a reason HashMap doesn't return references to the value?


#1

Is there a reason HashMap doesn't return references to the value? I'd like to be able to modify the value in the HashMap. Get, modify, set is making my code kinda ugly. Or is there a class I should be using instead?


#2

That's just the way it's designed.. To be honest, it's an old class that I don't use myself these days, which is the main reason I've not refactored it to work that way. I tend to use std::map myself, which will probably do a more efficient job for most purposes.


#3

Ok. I find your APIs much nicer than the standard library. I think I'll just modify the class.