Niels Lohmann
3f644908e5
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 >
2026-09-29 23:14:43 +02:00
..
2026-09-25 08:29:02 +02:00
2026-09-27 16:56:21 +02:00
2026-09-24 17:02:57 +02:00
2026-09-24 17:02:57 +02:00
2026-09-24 17:02:57 +02:00
2026-09-24 17:02:57 +02:00
2026-09-25 08:29:02 +02:00
2026-09-25 08:29:02 +02:00
2026-09-16 20:15:46 +02:00
2026-09-27 14:28:38 +02:00
2026-09-27 14:19:22 +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 14:28:38 +02:00
2026-09-27 16:56:21 +02:00
2026-09-24 17:05:37 +02:00
2026-09-27 16:56:21 +02:00
2026-09-16 20:15:46 +02:00
2026-09-28 17:51:07 +02:00
2026-09-27 14:19:22 +02:00
2026-09-28 17:56:11 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 14:21:58 +02:00
2026-09-11 08:22:50 +02:00
2026-09-16 20:15:46 +02:00
2026-09-15 20:46:37 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-25 20:19:43 +02:00
2026-09-27 14:19:22 +02:00
2026-09-25 08:29:36 +02:00
2026-09-27 14:19:22 +02:00
2026-09-27 16:56:21 +02:00
2026-09-24 17:12:02 +02:00
2026-09-09 09:52:58 +02:00
2026-09-09 09:52:58 +02:00
2026-09-27 14:19:22 +02:00
2026-09-27 14:19:22 +02:00
2026-09-27 14:28:38 +02:00
2026-09-28 22:20:43 +02:00
2026-09-27 14:19:22 +02:00
2026-09-29 23:14:43 +02:00
2026-09-28 17:51:07 +02:00
2026-09-16 20:15:46 +02:00
2026-09-16 20:15:46 +02:00
2026-09-27 16:56:21 +02:00
2026-09-24 17:01:15 +02:00
2026-09-25 17:56:18 +02:00
2026-09-28 17:51:07 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 16:56:21 +02:00
2026-09-27 14:19:22 +02:00
2026-09-27 14:19:22 +02:00
2026-09-27 14:28:38 +02:00
2026-09-25 20:44:30 +02:00
2026-09-16 20:16:43 +02:00
2026-09-16 20:16:43 +02:00
2026-09-16 20:16:43 +02:00
2026-09-10 17:20:48 +02:00
2026-09-27 14:19:22 +02:00