Throwing an exception is the proper behavior here. The `at` method cannot return `false` since the return type of the method is `T`, the element type in the `std::vector`. An exception of type `std::out_of_range` would be better, but note that the `at` method of `std::vector` will already throw that exception for you, so there is not need to throw is explicitly here. See this site:

(http://www.cplusplus.com/reference/vector/vector/at/)[http://www.cplusplus.com/reference/vector/vector/at/]

Note that it is good that you validated this behavior in a unit test though.