Torarin: > This is what STL map's operator [] does, and I think it's handy. It > only requires the addition of this overload: > > Value get(Key key) > { > auto p = key in *cast(Value[Key]*)(&p); > return p ? *p : Value.init; > }
In what cases is this useful? Are you able to show me an example of situation where it is useful? Bye, bearophile