Skip to content

Commit c9052ad

Browse files
authored
Merge pull request #732 from theopolis/boost-1.63
boost: Use make_optional for boost 1.63
2 parents 92d41b7 + 49e21a8 commit c9052ad

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

boost/network/protocol/http/client/options.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,39 +91,39 @@ class client_options {
9191
/// Set the filename of the certificate to load for the SSL connection for
9292
/// verification.
9393
client_options& openssl_certificate(string_type const& v) {
94-
openssl_certificate_ = v;
94+
openssl_certificate_ = make_optional(v);
9595
return *this;
9696
}
9797

9898
/// Set the directory for which the certificate authority files are located.
9999
client_options& openssl_verify_path(string_type const& v) {
100-
openssl_verify_path_ = v;
100+
openssl_verify_path_ = make_optional(v);
101101
return *this;
102102
}
103103

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

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

118118
/// Set the ciphers to support for SSL negotiation.
119119
client_options& openssl_ciphers(string_type const& v) {
120-
openssl_ciphers_ = v;
120+
openssl_ciphers_ = make_optional(v);
121121
return *this;
122122
}
123123

124124
/// Set the hostname for SSL SNI hostname support.
125125
client_options& openssl_sni_hostname(string_type const& v) {
126-
openssl_sni_hostname_ = v;
126+
openssl_sni_hostname_ = make_optional(v);
127127
return *this;
128128
}
129129

boost/network/protocol/http/message/async_message.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct async_message {
9191
for (string_type const & key : removed_headers) {
9292
raw_headers.erase(key);
9393
}
94-
retrieved_headers_ = raw_headers;
94+
retrieved_headers_ = make_optional(raw_headers);
9595
return *retrieved_headers_;
9696
}
9797

boost/network/uri/detail/uri_parts.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@ struct hierarchical_part {
2929
void update() {
3030
if (!user_info) {
3131
if (host) {
32-
user_info = iterator_range<FwdIter>(std::begin(host.get()),
33-
std::begin(host.get()));
32+
user_info = make_optional(iterator_range<FwdIter>(std::begin(host.get()),
33+
std::begin(host.get())));
3434
} else if (path) {
35-
user_info = iterator_range<FwdIter>(std::begin(path.get()),
36-
std::begin(path.get()));
35+
user_info = make_optional(iterator_range<FwdIter>(std::begin(path.get()),
36+
std::begin(path.get())));
3737
}
3838
}
3939

4040
if (!host) {
41-
host = iterator_range<FwdIter>(std::begin(path.get()),
42-
std::begin(path.get()));
41+
host = make_optional(iterator_range<FwdIter>(std::begin(path.get()),
42+
std::begin(path.get())));
4343
}
4444

4545
if (!port) {
46-
port = iterator_range<FwdIter>(std::end(host.get()),
47-
std::end(host.get()));
46+
port = make_optional(iterator_range<FwdIter>(std::end(host.get()),
47+
std::end(host.get())));
4848
}
4949

5050
if (!path) {
51-
path = iterator_range<FwdIter>(std::end(port.get()),
52-
std::end(port.get()));
51+
path = make_optional(iterator_range<FwdIter>(std::end(port.get()),
52+
std::end(port.get())));
5353
}
5454
}
5555
};
@@ -70,13 +70,13 @@ struct uri_parts {
7070
hier_part.update();
7171

7272
if (!query) {
73-
query = iterator_range<FwdIter>(std::end(hier_part.path.get()),
74-
std::end(hier_part.path.get()));
73+
query = make_optional(iterator_range<FwdIter>(std::end(hier_part.path.get()),
74+
std::end(hier_part.path.get())));
7575
}
7676

7777
if (!fragment) {
78-
fragment = iterator_range<FwdIter>(std::end(query.get()),
79-
std::end(query.get()));
78+
fragment = make_optional(iterator_range<FwdIter>(std::end(query.get()),
79+
std::end(query.get())));
8080
}
8181
}
8282
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy