Niels Lohmann
fc4c9c3446
Fix clear() to also reset the subtype of a binary value ( #5680 )
...
* Fix clear() to also reset the subtype of a binary value
clear() on a binary value cleared the bytes but left the subtype
untouched, so the result was not equal to a default-constructed
binary value even though the documentation says clear() has the same
effect as *this = basic_json(type()). The fix calls
byte_container_with_subtype::clear_subtype() alongside the existing
clear() call.
Extended the "filled binary" clear() test in unit-modifiers.cpp with
a case that uses a subtype, since the existing cases only covered
binary values without one.
Fixes #5669 .
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* Fix the table alignment in clear.md
Addresses review comment by @gregmarr.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-09-30 20:06:51 +02:00
..
2022-08-05 19:51:39 +02:00
2026-09-24 06:55:21 +02:00
2026-09-15 20:46:37 +02:00
2026-07-04 11:13:25 +02:00
2026-06-29 22:15:18 +02:00
2025-04-05 18:54:35 +02:00
2026-07-10 16:01:08 +02:00
2022-05-01 09:41:50 +02:00
2026-09-15 20:46:37 +02:00
2025-04-05 18:54:35 +02:00
2026-09-15 20:46:37 +02:00
2022-05-01 09:41:50 +02:00
2026-09-27 20:40:13 +02:00
2022-05-01 09:41:50 +02:00
2026-09-30 20:06:51 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2022-05-17 13:08:56 +02:00
2026-06-29 22:15:18 +02:00
2026-07-26 08:29:31 +00:00
2026-07-04 11:13:25 +02:00
2026-07-04 11:13:25 +02:00
2025-05-04 10:28:24 +02:00
2025-01-17 06:53:35 +01:00
2022-05-01 09:41:50 +02:00
2026-07-04 11:13:25 +02:00
2026-06-30 18:09:06 +02:00
2024-12-09 23:02:30 +01:00
2026-06-29 22:15:18 +02:00
2025-04-05 18:54:35 +02:00
2026-07-09 17:24:19 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-28 17:51:07 +02:00
2026-09-28 17:51:07 +02:00
2026-09-27 16:56:21 +02:00
2025-04-05 18:54:35 +02:00
2022-05-17 13:08:56 +02:00
2026-06-29 22:15:18 +02:00
2024-12-09 23:02:30 +01:00
2024-12-06 18:38:25 +01:00
2026-09-25 18:02:38 +02:00
2026-07-09 17:24:19 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-22 21:52:31 +02:00
2026-06-29 22:15:18 +02:00
2022-05-01 09:41:50 +02:00
2025-04-05 18:54:35 +02:00
2022-05-01 09:41:50 +02:00
2026-06-29 22:15:18 +02:00
2022-05-01 09:41:50 +02:00
2025-04-05 18:54:35 +02:00
2025-04-05 18:54:35 +02:00
2025-04-05 18:54:35 +02:00
2026-06-29 22:15:18 +02:00
2022-05-01 09:41:50 +02:00
2025-04-05 18:54:35 +02:00
2022-05-01 09:41:50 +02:00
2025-04-05 18:54:35 +02:00
2026-07-10 16:01:08 +02:00
2026-09-15 20:46:37 +02:00
2026-09-15 20:46:37 +02:00
2022-07-29 14:28:37 +02:00
2022-05-01 09:41:50 +02:00
2026-06-29 22:15:18 +02:00
2026-09-15 20:46:37 +02:00
2026-09-15 20:46:37 +02:00
2026-09-15 20:46:37 +02:00
2026-09-15 20:46:37 +02:00
2026-09-15 20:46:37 +02:00
2026-07-04 11:13:25 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2024-07-07 10:22:17 +02:00
2025-04-05 18:54:35 +02:00
2024-07-07 10:22:17 +02:00
2026-07-09 20:57:41 +02:00
2022-08-05 19:51:39 +02:00
2022-05-01 09:41:50 +02:00
2026-07-04 11:13:25 +02:00
2026-07-10 16:01:08 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2026-09-27 16:56:21 +02:00
2026-06-29 22:15:18 +02:00
2026-09-24 06:55:21 +02:00
2026-08-04 08:45:02 +02:00
2026-09-09 09:49:12 +02:00
2026-09-09 09:49:12 +02:00
2026-07-04 11:13:25 +02:00
2026-06-29 22:15:18 +02:00
2026-06-29 22:15:18 +02:00
2026-09-27 16:56:21 +02:00
2022-05-01 09:41:50 +02:00
2025-01-17 06:53:35 +01:00
2026-07-09 17:24:19 +02:00
2022-07-29 14:28:37 +02:00
2026-06-29 22:15:18 +02:00
2026-09-15 20:46:37 +02:00
2026-09-13 17:43:59 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-07-04 11:13:25 +02:00
2026-09-27 16:56:21 +02:00
2026-06-29 22:15:18 +02:00
2026-07-09 17:24:19 +02:00
2022-05-01 09:41:50 +02:00
2026-09-15 20:46:37 +02:00
2026-07-04 11:13:25 +02:00
2022-08-05 19:51:39 +02:00
2026-07-10 16:01:08 +02:00