Niels Lohmann
14e9150b97
Collect container values only in basic_json's own parse functions
...
A json_sax_dom_parser that a user constructs (as in the sax_no_exception
example) must hold the values read before a parse error, as on develop:
its value is used after the error. The values of containers of unknown
size are now collected on a stack only with the new template parameter
Collect (default false), which json::parse() and the json_view
materialization set; without it, every value is stored in place as it
arrives. A test checks the values kept after an error for json and
ordered_json.
Also fixes the clang-tidy, cpplint and Infer findings: the frame stack
keeps its first frames in a std::array (left uninitialized) and the
others in a std::unique_ptr, auto for create<>(), NOLINT for member
initializers -Weffc++ needs, and an @infer-ignore for the nullptr that
place_container() does not use.
json::parse() and ordered_json::parse() instructions are unchanged
(Apple clang; twitter, citm, canada, jeopardy: -0.03 % to +0.25 %).
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-22 22:56:35 +02:00
..
2026-10-17 08:28:28 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-10-14 17:38:36 +02:00
2026-10-15 20:04:57 +02:00
2026-01-01 20:00:39 +01:00
2026-10-21 10:21:29 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-21 10:21:27 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-15 20:04:57 +02:00
2026-10-21 10:21:30 +02:00
2026-01-01 20:00:39 +01:00
2026-10-01 07:33:07 +02:00
2026-10-01 07:33:07 +02:00
2026-10-11 08:21:13 +02:00
2026-09-16 20:15:46 +02:00
2026-10-06 22:53:03 +02:00
2026-10-01 07:33:07 +02:00
2026-10-15 20:01:20 +02:00
2026-10-08 16:11:16 +02:00
2026-10-06 22:33:29 +02:00
2026-10-01 07:37:47 +02:00
2026-10-14 17:38:37 +02:00
2026-10-09 17:05:36 +02:00
2026-10-04 17:18:19 +02:00
2026-10-21 10:23:48 +02:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-10-11 08:22:00 +02:00
2026-10-07 07:39:05 +02:00
2026-10-09 16:56:14 +02:00
2026-09-16 20:15:46 +02:00
2026-10-01 07:37:47 +02:00
2026-10-10 00:05:02 +02:00
2026-09-27 14:19:22 +02:00
2026-01-01 20:00:39 +01:00
2026-10-21 20:00:51 +02:00
2026-10-22 22:56:35 +02:00
2026-10-15 20:01:21 +02:00
2026-01-01 20:00:39 +01:00
2026-09-30 20:07:52 +02:00
2026-10-16 19:16:21 +02:00
2026-09-11 08:22:50 +02:00
2026-10-04 17:18:19 +02:00
2026-10-06 07:22:55 +02:00
2026-10-21 08:36:31 +00:00
2026-10-09 16:56:14 +02:00
2026-10-13 17:16:52 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-10-11 08:24:31 +02:00
2026-10-21 08:36:31 +00:00
2026-10-10 00:05:02 +02:00
2026-10-08 16:11:16 +02:00
2026-10-06 07:22:55 +02:00
2026-10-13 17:16:52 +02:00
2026-09-30 21:36:04 +02:00
2026-10-07 16:37:19 +02:00
2026-10-16 19:16:21 +02:00
2026-09-30 20:53:56 +02:00
2026-10-04 17:18:19 +02:00
2026-09-30 20:07:06 +02:00
2026-10-11 08:21:41 +02:00
2026-10-04 17:54:05 +02:00
2026-10-04 17:54:05 +02:00
2026-09-27 16:56:21 +02:00
2026-10-19 22:00:58 +02:00
2026-07-02 15:59:36 +02:00
2026-10-20 22:24:09 +02:00
2026-10-08 16:11:16 +02:00
2026-01-01 20:00:39 +01:00
2026-09-09 09:52:58 +02:00
2026-10-04 22:11:34 +02:00
2026-10-16 19:16:21 +02:00
2026-10-01 07:33:07 +02:00
2026-01-01 20:00:39 +01:00
2026-10-15 20:01:22 +02:00
2026-10-16 19:16:21 +02:00
2026-10-21 10:21:29 +02:00
2026-10-21 20:01:38 +02:00
2026-10-21 10:21:30 +02:00
2026-10-21 10:21:30 +02:00
2026-10-21 10:21:30 +02:00
2026-10-21 10:21:27 +02:00
2026-10-21 10:21:28 +02:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-10-17 08:28:28 +02:00
2026-10-14 17:38:36 +02:00
2026-10-12 09:33:43 +02:00
2026-10-01 07:37:47 +02:00
2026-01-01 20:00:39 +01:00
2026-10-04 17:18:19 +02:00
2026-10-06 22:53:03 +02:00
2026-10-21 08:36:31 +00:00
2026-10-21 08:36:31 +00:00
2026-09-30 20:08:17 +02:00
2026-09-16 20:15:46 +02:00
2026-09-09 09:48:17 +02:00
2026-09-16 20:15:46 +02:00
2026-10-02 17:25:17 +02:00
2026-10-09 16:56:14 +02:00
2026-10-22 09:28:03 +02:00
2026-10-04 17:18:19 +02:00
2026-10-02 11:23:55 +02:00
2026-10-19 22:00:58 +02:00
2026-10-19 22:00:31 +02:00
2026-10-01 07:33:07 +02:00
2026-01-01 20:00:39 +01:00
2026-10-08 16:11:16 +02:00
2026-10-08 16:11:16 +02:00
2026-10-21 08:36:31 +00:00
2026-10-15 20:04:42 +02:00
2026-10-21 20:01:28 +02:00
2026-09-27 14:19:22 +02:00
2026-10-21 20:14:59 +02:00
2026-10-21 20:00:51 +02:00
2026-10-16 19:16:21 +02:00
2026-10-16 19:16:21 +02:00
2026-10-21 20:14:59 +02:00
2026-10-15 22:42:46 +02:00
2026-10-04 11:50:42 +02:00
2026-10-07 08:50:12 +02:00
2026-01-01 20:00:39 +01:00
2026-09-25 20:44:30 +02:00
2026-10-06 22:33:29 +02:00
2026-10-07 19:17:57 +02:00
2026-10-01 07:37:47 +02:00
2026-01-01 20:00:39 +01:00
2026-10-04 17:18:19 +02:00
2026-09-30 22:49:24 +02:00
2026-10-01 07:37:47 +02:00