mirror of
https://github.com/nlohmann/json.git
synced 2025-07-13 20:21:48 +03:00
Make the indirection and dereference operators of iterator const
fixes #233
This commit is contained in:
@ -7000,13 +7000,13 @@ class basic_json
|
||||
}
|
||||
|
||||
/// return a reference to the value pointed to by the iterator
|
||||
reference operator*()
|
||||
reference operator*() const
|
||||
{
|
||||
return const_cast<reference>(base_iterator::operator*());
|
||||
}
|
||||
|
||||
/// dereference the iterator
|
||||
pointer operator->()
|
||||
pointer operator->() const
|
||||
{
|
||||
return const_cast<pointer>(base_iterator::operator->());
|
||||
}
|
||||
|
Reference in New Issue
Block a user