mirror of
https://github.com/nlohmann/json.git
synced 2026-10-14 10:17:12 +00:00
👌 clean operator[]
This commit is contained in:
2 files changed
-12
No files matched your search
@@ -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())));
|
||||
|
||||
Reference in new issue
Block a user