fork download
  1. #include <unordered_map>
  2. using std::unordered_map;
  3.  
  4. class MyClass {
  5. public:
  6. ~MyClass() {}
  7.  
  8. private:
  9. MyClass() {}
  10. };
  11.  
  12. int main() {
  13. std::unordered_map<int, MyClass> x;
  14. x.at(3);
  15. //x[3];
  16. }
  17.  
Runtime error #stdin #stdout #stderr 0s 3424KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::out_of_range'
  what():  _Map_base::at