Feature: overload map::at( defaultValue )
Can we implement something like map::at ( key, defaultValue )
in ext::map
?
If key
is found, then return key
. If not, do not raise exception, instead return copy of defaultValue
.
Something similar is e.g. in python:
d = dict() ; d.get(val, default=None)
d = DefaultDict(lambda: SomeValue) ; d.get(val)
Is it a good idea?