It was a good idea to implement a const version of operator[] it in the first place. I was a pity that this implementation was flawed. It was a mistake to remove the const version completely. This commit re-introduces the const version. My apologies for all the inconvenience.
This commit is contained in:
parent
9def0186be
commit
4351698c83
5 changed files with 197 additions and 2 deletions
|
@ -5,7 +5,7 @@ using namespace nlohmann;
|
|||
int main()
|
||||
{
|
||||
// create a JSON object
|
||||
json object =
|
||||
const json object =
|
||||
{
|
||||
{"one", 1}, {"two", 2}, {"three", 2.9}
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
<a target="_blank" href="http://melpon.org/wandbox/permlink/9X5Q8p7DlWA6v0Ey"><b>online</b></a>
|
||||
<a target="_blank" href="http://melpon.org/wandbox/permlink/4WLxv7id8P64Q1KI"><b>online</b></a>
|
Loading…
Add table
Add a link
Reference in a new issue