mirror of
https://github.com/nlohmann/json.git
synced 2025-07-31 10:24:23 +03:00
✅ add test to compile without exceptions
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
#include <utility> // pair
|
||||
#include <vector> // vector
|
||||
|
||||
#include <nlohmann/detail/macro_scope.hpp>
|
||||
|
||||
namespace nlohmann
|
||||
{
|
||||
|
||||
@ -64,7 +66,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
|
||||
@ -77,7 +79,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)
|
||||
|
Reference in New Issue
Block a user