Merge branch 'develop' of https://github.com/nlohmann/json into ci

This commit is contained in:
Niels Lohmann 2021-03-23 12:00:42 +01:00
commit 3d1048ea78
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
4 changed files with 2 additions and 4 deletions

View File

@ -579,7 +579,7 @@ bool foo = j.at(2);
j == R"(["foo", 1, true, 1.78])"_json; // true j == R"(["foo", 1, true, 1.78])"_json; // true
// other stuff // other stuff
j.size(); // 3 entries j.size(); // 4 entries
j.empty(); // false j.empty(); // false
j.type(); // json::value_t::array j.type(); // json::value_t::array
j.clear(); // the array is empty again j.clear(); // the array is empty again

View File

@ -8,7 +8,7 @@ try
{ {
j = json::parse(my_input); j = json::parse(my_input);
} }
catch (json::exception::parse_error& ex) catch (json::parse_error& ex)
{ {
std::cerr << "parse error at byte " << ex.byte << std::endl; std::cerr << "parse error at byte " << ex.byte << std::endl;
} }

View File

@ -50,7 +50,6 @@ class exception : public std::exception
{ {
public: public:
/// returns the explanatory string /// returns the explanatory string
JSON_HEDLEY_RETURNS_NON_NULL
const char* what() const noexcept override const char* what() const noexcept override
{ {
return m.what(); return m.what();

View File

@ -2637,7 +2637,6 @@ class exception : public std::exception
{ {
public: public:
/// returns the explanatory string /// returns the explanatory string
JSON_HEDLEY_RETURNS_NON_NULL
const char* what() const noexcept override const char* what() const noexcept override
{ {
return m.what(); return m.what();