1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

add test to compile without exceptions

This commit is contained in:
Niels Lohmann
2020-08-10 09:48:11 +02:00
parent 1b28a58280
commit 4080d0b1a4
4 changed files with 16 additions and 5 deletions

View File

@ -16395,6 +16395,9 @@ class serializer
#include <utility> // pair
#include <vector> // vector
// #include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
@ -16454,7 +16457,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
}
}
throw std::out_of_range("key not found");
JSON_THROW(std::out_of_range("key not found"));
}
const T& at(const Key& key) const
@ -16467,7 +16470,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
}
}
throw std::out_of_range("key not found");
JSON_THROW(std::out_of_range("key not found"));
}
size_type erase(const Key& key)