Skip to content

Commit bb006d6

Browse files
committed
Added free swap functions to client_options, request_options, request and response.
1 parent 9345bed commit bb006d6

File tree

4 files changed

+280
-251
lines changed

4 files changed

+280
-251
lines changed

http/src/network/http/v2/client/client.hpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ namespace network {
7676
* \brief Swap.
7777
*/
7878
void swap(client_options &other) noexcept {
79+
using std::swap;
7980
std::swap(io_service_, other.io_service_);
80-
std::swap(follow_redirects_, other.follow_redirects_);
81-
std::swap(cache_resolved_, other.cache_resolved_);
82-
std::swap(use_proxy_, other.use_proxy_);
83-
std::swap(timeout_, other.timeout_);
84-
std::swap(openssl_certificate_paths_, other.openssl_certificate_paths_);
85-
std::swap(openssl_verify_paths_, other.openssl_verify_paths_);
81+
swap(follow_redirects_, other.follow_redirects_);
82+
swap(cache_resolved_, other.cache_resolved_);
83+
swap(use_proxy_, other.use_proxy_);
84+
swap(timeout_, other.timeout_);
85+
swap(openssl_certificate_paths_, other.openssl_certificate_paths_);
86+
swap(openssl_verify_paths_, other.openssl_verify_paths_);
8687
}
8788

8889
/**
@@ -225,6 +226,11 @@ namespace network {
225226

226227
};
227228

229+
inline
230+
void swap(client_options &lhs, client_options &rhs) noexcept {
231+
lhs.swap(rhs);
232+
}
233+
228234
template <typename Handler, typename Signature>
229235
struct handler_type { };
230236

0 commit comments

Comments
 (0)