mirror of
https://github.com/nlohmann/json
synced 2024-11-25 05:10:05 +00:00
👌 clean operator[]
This commit is contained in:
parent
e4af1ddb18
commit
d4a91b7445
@ -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())));
|
||||
|
@ -20305,13 +20305,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())));
|
||||
|
Loading…
Reference in New Issue
Block a user