From de7f9f118ecee9b79505dadbb4c72ebe69b2b709 Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Sat, 2 Nov 2024 19:28:38 -0400 Subject: [PATCH] Remove basic_json proxy type --- CHANGELOG.md | 17 ++++++++++++++++- doc/ref/corelib/basic_json.md | 1 + doc/ref/corelib/json/operator_at.md | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ab11b5e2..5cbde2cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,19 @@ -0.178.0 (on master) +0.179.0 (on master) +------- + +Changes: + +- Removed `basic_json` proxy type. The rationale for this change is given in #315. + +- The new behavior for the non-const overload of operator[](const string_view_type&) will follow the standard library +`std::map` behavior, that is, return a reference to the value that is associated with the key, inserting a default +constructed value with the key if no such key already exists. + +- The new behavior for the const overload of operator[](const string_view_type&) will be to return +a const reference to the value that is associated with key, returning a const reference to a default +constructed value with static storage duration if no such key already exists. + +0.178.0 ------- Defect fixes: diff --git a/doc/ref/corelib/basic_json.md b/doc/ref/corelib/basic_json.md index 598da6e36..f4a12315b 100644 --- a/doc/ref/corelib/basic_json.md +++ b/doc/ref/corelib/basic_json.md @@ -98,6 +98,7 @@ Member type |Definition `const_object_range_type`|range (since 0.173.3) `array_range_type`|range (since 0.173.3) `const_array_range_type`|range (since 0.173.3) +`proxy_type`|proxy. The `proxy_type` class supports conversion to `basic_json&`. (removed in 0.179.0) ### Static member functions diff --git a/doc/ref/corelib/json/operator_at.md b/doc/ref/corelib/json/operator_at.md index b3aee6cb6..d72445ca3 100644 --- a/doc/ref/corelib/json/operator_at.md +++ b/doc/ref/corelib/json/operator_at.md @@ -34,7 +34,7 @@ when this operator is used for reading but the key does not exist. ### Examples -#### Assigning to a proxy when the key does not exist +#### Assigning to and` object when the key does not exist ```cpp int main()