mirror of
https://github.com/nlohmann/json.git
synced 2026-05-07 06:45:24 +00:00
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:
@@ -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>
|
||||
Reference in New Issue
Block a user