Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
boost: Use make_optional for boost 1.63
  • Loading branch information
Teddy Reed committed Feb 17, 2017
commit 49e21a8fea5ca1ddbfed0817745adcc6ef46a780
12 changes: 6 additions & 6 deletions boost/network/protocol/http/client/options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,39 +91,39 @@ class client_options {
/// Set the filename of the certificate to load for the SSL connection for
/// verification.
client_options& openssl_certificate(string_type const& v) {
openssl_certificate_ = v;
openssl_certificate_ = make_optional(v);
return *this;
}

/// Set the directory for which the certificate authority files are located.
client_options& openssl_verify_path(string_type const& v) {
openssl_verify_path_ = v;
openssl_verify_path_ = make_optional(v);
return *this;
}

/// Set the filename of the certificate to use for client-side SSL session
/// establishment.
client_options& openssl_certificate_file(string_type const& v) {
openssl_certificate_file_ = v;
openssl_certificate_file_ = make_optional(v);
return *this;
}

/// Set the filename of the private key to use for client-side SSL session
/// establishment.
client_options& openssl_private_key_file(string_type const& v) {
openssl_private_key_file_ = v;
openssl_private_key_file_ = make_optional(v);
return *this;
}

/// Set the ciphers to support for SSL negotiation.
client_options& openssl_ciphers(string_type const& v) {
openssl_ciphers_ = v;
openssl_ciphers_ = make_optional(v);
return *this;
}

/// Set the hostname for SSL SNI hostname support.
client_options& openssl_sni_hostname(string_type const& v) {
openssl_sni_hostname_ = v;
openssl_sni_hostname_ = make_optional(v);
return *this;
}

Expand Down
2 changes: 1 addition & 1 deletion boost/network/protocol/http/message/async_message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct async_message {
for (string_type const & key : removed_headers) {
raw_headers.erase(key);
}
retrieved_headers_ = raw_headers;
retrieved_headers_ = make_optional(raw_headers);
return *retrieved_headers_;
}

Expand Down
28 changes: 14 additions & 14 deletions boost/network/uri/detail/uri_parts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ struct hierarchical_part {
void update() {
if (!user_info) {
if (host) {
user_info = iterator_range<FwdIter>(std::begin(host.get()),
std::begin(host.get()));
user_info = make_optional(iterator_range<FwdIter>(std::begin(host.get()),
std::begin(host.get())));
} else if (path) {
user_info = iterator_range<FwdIter>(std::begin(path.get()),
std::begin(path.get()));
user_info = make_optional(iterator_range<FwdIter>(std::begin(path.get()),
std::begin(path.get())));
}
}

if (!host) {
host = iterator_range<FwdIter>(std::begin(path.get()),
std::begin(path.get()));
host = make_optional(iterator_range<FwdIter>(std::begin(path.get()),
std::begin(path.get())));
}

if (!port) {
port = iterator_range<FwdIter>(std::end(host.get()),
std::end(host.get()));
port = make_optional(iterator_range<FwdIter>(std::end(host.get()),
std::end(host.get())));
}

if (!path) {
path = iterator_range<FwdIter>(std::end(port.get()),
std::end(port.get()));
path = make_optional(iterator_range<FwdIter>(std::end(port.get()),
std::end(port.get())));
}
}
};
Expand All @@ -70,13 +70,13 @@ struct uri_parts {
hier_part.update();

if (!query) {
query = iterator_range<FwdIter>(std::end(hier_part.path.get()),
std::end(hier_part.path.get()));
query = make_optional(iterator_range<FwdIter>(std::end(hier_part.path.get()),
std::end(hier_part.path.get())));
}

if (!fragment) {
fragment = iterator_range<FwdIter>(std::end(query.get()),
std::end(query.get()));
fragment = make_optional(iterator_range<FwdIter>(std::end(query.get()),
std::end(query.get())));
}
}
};
Expand Down