News for hackers. Stuff that matters.
Re:Mapping Strings in C++ by charles-salvia on Wednesday April 12, 2017 @08:47PM (#14103117)
The point is apparently to return "type_t::num_types" if the key doesn't exist in the map. Using at() throws an exception if the key doesn't exist.
Re:Mapping Strings in C++ by user5994461 on Thursday April 13, 2017 @05:19AM (#14105369)
That's an artificial requirements, you can do the same with at() or change the requirements.

Catching all errors to return a default type is an arguable decision.