@brief exchanges the values @sa https://json.nlohmann.me/api/basic_json/swap/
| 3196 | /// @brief exchanges the values |
| 3197 | /// @sa https://json.nlohmann.me/api/basic_json/swap/ |
| 3198 | void swap(reference other) noexcept ( |
| 3199 | std::is_nothrow_move_constructible<value_t>::value&& |
| 3200 | std::is_nothrow_move_assignable<value_t>::value&& |
| 3201 | std::is_nothrow_move_constructible<json_value>::value&& |
| 3202 | std::is_nothrow_move_assignable<json_value>::value |
| 3203 | ) |
| 3204 | { |
| 3205 | std::swap(m_type, other.m_type); |
| 3206 | std::swap(m_value, other.m_value); |
| 3207 | |
| 3208 | set_parents(); |
| 3209 | other.set_parents(); |
| 3210 | assert_invariant(); |
| 3211 | } |
| 3212 | |
| 3213 | /// @brief exchanges the values |
| 3214 | /// @sa https://json.nlohmann.me/api/basic_json/swap/ |