1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00

keys are now returned as const reference #1098

This commit is contained in:
Niels Lohmann
2018-05-26 13:26:40 +02:00
parent 4639bb2c8f
commit 90eb0a91e0
3 changed files with 30 additions and 10 deletions

View File

@ -583,7 +583,7 @@ class iter_impl
@brief return the key of an object iterator
@pre The iterator is initialized; i.e. `m_object != nullptr`.
*/
typename object_t::key_type key() const
const typename object_t::key_type& key() const
{
assert(m_object != nullptr);