MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / swap

Function swap

include/behaviortree_cpp/contrib/json.hpp:22764–22777  ·  view source on GitHub ↗

@brief exchanges the values @sa https://json.nlohmann.me/api/basic_json/swap/

Source from the content-addressed store, hash-verified

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/

Callers 1

json.hppFile · 0.70

Calls 9

set_parentsFunction · 0.85
is_arrayFunction · 0.85
createFunction · 0.85
concatFunction · 0.85
is_objectFunction · 0.85
is_stringFunction · 0.85
is_binaryFunction · 0.85
type_nameFunction · 0.70
swapMethod · 0.45

Tested by

no test coverage detected