MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / swap

Function swap

Source/Utils/json.hpp:22358–22368  ·  view source on GitHub ↗

! @brief exchanges the values Exchanges the contents of the JSON value with those of @a other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated. @param[in,out] other JSON value to exchange the contents with @complexity Constant.

Source from the content-addressed store, hash-verified

22356 @since version 1.0.0
22357 */
22358 void swap(reference other) noexcept (
22359 std::is_nothrow_move_constructible<value_t>::value&&
22360 std::is_nothrow_move_assignable<value_t>::value&&
22361 std::is_nothrow_move_constructible<json_value>::value&&
22362 std::is_nothrow_move_assignable<json_value>::value
22363 )
22364 {
22365 std::swap(m_type, other.m_type);
22366 std::swap(m_value, other.m_value);
22367 assert_invariant();
22368 }
22369
22370 /*!
22371 @brief exchanges the values

Callers 1

json.hppFile · 0.85

Calls 7

assert_invariantFunction · 0.85
is_arrayFunction · 0.85
createFunction · 0.85
type_nameFunction · 0.85
is_objectFunction · 0.85
is_stringFunction · 0.85
is_binaryFunction · 0.85

Tested by

no test coverage detected