Lines Matching defs:swap
32 #include <utility> // declval, forward, move, pair, swap
1229 using std::swap;
1230 swap(m_type, other.m_type);
1231 swap(m_value, other.m_value);
3453 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3454 void swap(reference other) noexcept (
3461 std::swap(m_type, other.m_type);
3462 std::swap(m_value, other.m_value);
3470 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3471 friend void swap(reference left, reference right) noexcept (
3478 left.swap(right);
3482 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3483 void swap(array_t& other) // NOLINT(bugprone-exception-escape)
3485 // swap only works for arrays
3488 using std::swap;
3489 swap(*(m_value.array), other);
3493 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(array_t&) with ", type_name()), this));
3498 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3499 void swap(object_t& other) // NOLINT(bugprone-exception-escape)
3501 // swap only works for objects
3504 using std::swap;
3505 swap(*(m_value.object), other);
3509 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(object_t&) with ", type_name()), this));
3514 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3515 void swap(string_t& other) // NOLINT(bugprone-exception-escape)
3517 // swap only works for strings
3520 using std::swap;
3521 swap(*(m_value.string), other);
3525 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(string_t&) with ", type_name()), this));
3530 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3531 void swap(binary_t& other) // NOLINT(bugprone-exception-escape)
3533 // swap only works for strings
3536 using std::swap;
3537 swap(*(m_value.binary), other);
3541 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t&) with ", type_name()), this));
3546 /// @sa https://json.nlohmann.me/api/basic_json/swap/
3547 void swap(typename binary_t::container_type& other) // NOLINT(bugprone-exception-escape)
3549 // swap only works for strings
3552 using std::swap;
3553 swap(*(m_value.binary), other);
3557 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t::container_type&) with ", type_name()), this));
5196 inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name)
5200 j1.swap(j2);