| 1304 | } |
| 1305 | |
| 1306 | void uninitialized_move(basic_json&& other) noexcept |
| 1307 | { |
| 1308 | if (is_trivial_storage(other.storage_kind())) |
| 1309 | { |
| 1310 | std::memcpy(static_cast<void*>(this), &other, sizeof(basic_json)); |
| 1311 | } |
| 1312 | else |
| 1313 | { |
| 1314 | switch (other.storage_kind()) |
| 1315 | { |
| 1316 | case json_storage_kind::long_str: |
| 1317 | construct<long_string_storage>(other.cast<long_string_storage>()); |
| 1318 | other.construct<null_storage>(); |
| 1319 | break; |
| 1320 | case json_storage_kind::byte_str: |
| 1321 | construct<byte_string_storage>(other.cast<byte_string_storage>()); |
| 1322 | other.construct<null_storage>(); |
| 1323 | break; |
| 1324 | case json_storage_kind::array: |
| 1325 | construct<array_storage>(other.cast<array_storage>()); |
| 1326 | other.construct<null_storage>(); |
| 1327 | break; |
| 1328 | case json_storage_kind::object: |
| 1329 | construct<object_storage>(other.cast<object_storage>()); |
| 1330 | other.construct<null_storage>(); |
| 1331 | break; |
| 1332 | default: |
| 1333 | JSONCONS_UNREACHABLE(); |
| 1334 | break; |
| 1335 | } |
| 1336 | } |
| 1337 | } |
| 1338 | |
| 1339 | void uninitialized_move_a(std::true_type /* stateless allocator */, |
| 1340 | basic_json&& other, const Allocator&) noexcept |
no test coverage detected