MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / swap

Function swap

native/thirdpart/json/json.hpp:20054–20064  ·  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. @liveexample{The example

Source from the content-addressed store, hash-verified

20052 @since version 1.0.0
20053 */
20054 void swap(reference other) noexcept (
20055 std::is_nothrow_move_constructible<value_t>::value and
20056 std::is_nothrow_move_assignable<value_t>::value and
20057 std::is_nothrow_move_constructible<json_value>::value and
20058 std::is_nothrow_move_assignable<json_value>::value
20059 )
20060 {
20061 std::swap(m_type, other.m_type);
20062 std::swap(m_value, other.m_value);
20063 assert_invariant();
20064 }
20065
20066 /*!
20067 @brief exchanges the values

Callers 1

json.hppFile · 0.70

Calls 5

assert_invariantFunction · 0.85
is_arrayFunction · 0.85
createFunction · 0.85
is_objectFunction · 0.85
is_stringFunction · 0.85

Tested by

no test coverage detected