Skip to content

Commit 2b8406e

Browse files
maingohglynos
authored andcommitted
Explicitely set boost namespace when using make_optional. Avoid conflicting with std::make_optional from c++17 (#880)
1 parent 2bef8be commit 2b8406e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

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

101101
/// Set the directory for which the certificate authority files are located.
102102
client_options& openssl_verify_path(string_type const& v) {
103-
openssl_verify_path_ = make_optional(v);
103+
openssl_verify_path_ = boost::make_optional(v);
104104
return *this;
105105
}
106106

107107
/// Set the filename of the certificate to use for client-side SSL session
108108
/// establishment.
109109
client_options& openssl_certificate_file(string_type const& v) {
110-
openssl_certificate_file_ = make_optional(v);
110+
openssl_certificate_file_ = boost::make_optional(v);
111111
return *this;
112112
}
113113

114114
/// Set the filename of the private key to use for client-side SSL session
115115
/// establishment.
116116
client_options& openssl_private_key_file(string_type const& v) {
117-
openssl_private_key_file_ = make_optional(v);
117+
openssl_private_key_file_ = boost::make_optional(v);
118118
return *this;
119119
}
120120

121121
/// Set the ciphers to support for SSL negotiation.
122122
client_options& openssl_ciphers(string_type const& v) {
123-
openssl_ciphers_ = make_optional(v);
123+
openssl_ciphers_ = boost::make_optional(v);
124124
return *this;
125125
}
126126

127127
/// Set the hostname for SSL SNI hostname support.
128128
client_options& openssl_sni_hostname(string_type const& v) {
129-
openssl_sni_hostname_ = make_optional(v);
129+
openssl_sni_hostname_ = boost::make_optional(v);
130130
return *this;
131131
}
132132

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct async_message {
9797
for (string_type const & key : removed_headers) {
9898
raw_headers.erase(key);
9999
}
100-
retrieved_headers_ = make_optional(raw_headers);
100+
retrieved_headers_ = boost::make_optional(raw_headers);
101101
return *retrieved_headers_;
102102
}
103103

0 commit comments

Comments
 (0)