| 1032 | } |
| 1033 | |
| 1034 | void TJsonValue::SwapWithUndefined(TJsonValue& output) noexcept { |
| 1035 | if (Type == JSON_STRING) { |
| 1036 | static_assert(std::is_nothrow_move_constructible<TString>::value, "noexcept violation! Add some try {} catch (...) logic"); |
| 1037 | new (&output.Value.String) TString(std::move(Value.String)); |
| 1038 | Value.String.~TString(); |
| 1039 | } else { |
| 1040 | std::memcpy(&output.Value, &Value, sizeof(Value)); |
| 1041 | } |
| 1042 | output.Type = Type; |
| 1043 | Type = JSON_UNDEFINED; |
| 1044 | } |
| 1045 | |
| 1046 | void TJsonValue::Swap(TJsonValue& rhs) noexcept { |
| 1047 | TJsonValue tmp(std::move(*this)); |
no test coverage detected