Closed frederick-vs-ja closed 3 months ago
Some functions of basic_json and basic_json_slice allocate memory, either directly or through the constructor of string_type. Should we document the exceptions that occur in these scenarios?
Some functions of basic_json and basic_json_slice allocate memory, either directly or through the constructor of string_type. Should we document the exceptions that occur in these scenarios?
I guess we should be just more precise on when and how allocator is used to allocate storage (for the stored object in the string, array, or object state). The actual exception thrown on allocation failure totally depends on the allocator ([allocator.requirements.general]).
The <json>
paper doesn't seem responsible for documenting exception on allocation failure, which is possibly totally user-specified.
Some functions of basic_json and basic_json_slice allocate memory, either directly or through the constructor of string_type. Should we document the exceptions that occur in these scenarios?
I guess we should be just more precise on when and how allocator is used to allocate storage (for the stored object in the string, array, or object state). The actual exception thrown on allocation failure totally depends on the allocator ([allocator.requirements.general]).
The
<json>
paper doesn't seem responsible for documenting exception on allocation failure, which is possibly totally user-specified.
https://eel.is/c++draft/vector.modifiers#2 & https://eel.is/c++draft/vector.modifiers#4
The new commit should have addressed the concerns on throwing exceptions.
There're many things changed to meet the standard wording style.
const
std::
only forstd::move
[[nodiscard]]
(see SD-9)inline
Many completion and changes in my mind:
Object
is considered transparent comparablerequires
-clauses to Constraints