You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T& dict<>::operator[](const K &key) creates the entry with its default constructor when it is not already in the dict. You can't do that with a const dict<>. Use const T& dict<>::at(const K &key) const to access an already existing entry (throws std::out_of_range for non existing entries).
It might be nice to have a const operator[] in the dict class, for accessing elements from const dicts.
The text was updated successfully, but these errors were encountered: