MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / swap

Function swap

dependencies/json/json.hpp:22442–22452  ·  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

22440 @since version 1.0.0
22441 */
22442 void swap(reference other) noexcept (
22443 std::is_nothrow_move_constructible<value_t>::value&&
22444 std::is_nothrow_move_assignable<value_t>::value&&
22445 std::is_nothrow_move_constructible<json_value>::value&&
22446 std::is_nothrow_move_assignable<json_value>::value
22447 )
22448 {
22449 std::swap(m_type, other.m_type);
22450 std::swap(m_value, other.m_value);
22451 assert_invariant();
22452 }
22453
22454 /*!
22455 @brief exchanges the values

Callers 1

json.hppFile · 0.70

Calls 6

is_arrayFunction · 0.70
createFunction · 0.70
type_nameFunction · 0.70
is_objectFunction · 0.70
is_stringFunction · 0.70
is_binaryFunction · 0.70

Tested by

no test coverage detected