3 ms·
You need both access patterns (otherwise you do a double-lookup to insert a default value) and C++ already provides both.
by sicp-enjoyer 4y ago
You need both access patterns (otherwise you do a double-lookup to insert a default value) and C++ already provides both.
- deredede 4y agoWhatever is implemented by operator[] in a given language is going to be implicitly encouraged by the language, and that's what most novices will use.