MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / swap

Method swap

extern/json/json.hpp:5280–5290  ·  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

5278 @since version 1.0.0
5279 */
5280 void swap(reference other) noexcept (
5281 std::is_nothrow_move_constructible<value_t>::value and
5282 std::is_nothrow_move_assignable<value_t>::value and
5283 std::is_nothrow_move_constructible<json_value>::value and
5284 std::is_nothrow_move_assignable<json_value>::value
5285 )
5286 {
5287 std::swap(m_type, other.m_type);
5288 std::swap(m_value, other.m_value);
5289 assert_invariant();
5290 }
5291
5292 /*!
5293 @brief exchanges the values

Callers 2

dispatcherMethod · 0.45
swapFunction · 0.45

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected