C++ Exception test: out_of_range