@brief exchanges the values @sa https://json.nlohmann.me/api/basic_json/swap/
| 22762 | /// @brief exchanges the values |
| 22763 | /// @sa https://json.nlohmann.me/api/basic_json/swap/ |
| 22764 | void swap(reference other) noexcept ( |
| 22765 | std::is_nothrow_move_constructible<value_t>::value&& |
| 22766 | std::is_nothrow_move_assignable<value_t>::value&& |
| 22767 | std::is_nothrow_move_constructible<json_value>::value&& // NOLINT(cppcoreguidelines-noexcept-swap,performance-noexcept-swap) |
| 22768 | std::is_nothrow_move_assignable<json_value>::value |
| 22769 | ) |
| 22770 | { |
| 22771 | std::swap(m_data.m_type, other.m_data.m_type); |
| 22772 | std::swap(m_data.m_value, other.m_data.m_value); |
| 22773 | |
| 22774 | set_parents(); |
| 22775 | other.set_parents(); |
| 22776 | assert_invariant(); |
| 22777 | } |
| 22778 | |
| 22779 | /// @brief exchanges the values |
| 22780 | /// @sa https://json.nlohmann.me/api/basic_json/swap/ |