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

👌 clean operator[]

This commit is contained in:
Niels Lohmann
2021-01-08 11:29:28 +01:00
parent e4af1ddb18
commit d4a91b7445
2 changed files with 0 additions and 12 deletions

View File

@ -3669,13 +3669,7 @@ class basic_json
#endif
}
#if JSON_DIAGNOSTICS
reference result = m_value.array->operator[](idx);
result.m_parent = this;
return result;
#else
return m_value.array->operator[](idx);
#endif
}
JSON_THROW(type_error::create(305, diagnostics() + "cannot use operator[] with a numeric argument with " + std::string(type_name())));