aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-11-01 12:28:28 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-11-01 12:28:28 -0500
commit14e94c69184f25bb215ce11d1e2d0e32b6ac7a0a (patch)
tree31a326202777d977762ea40fc951f86aa1e5d520 /contrib/epee/src
parentMerge pull request #8013 (diff)
parentepee: avoid ADL selecting C++14 std::quoted (diff)
downloadmonero-14e94c69184f25bb215ce11d1e2d0e32b6ac7a0a.tar.xz
Merge pull request #8016
b0ec9f8 epee: avoid ADL selecting C++14 std::quoted (selsta)
Diffstat (limited to 'contrib/epee/src')
-rw-r--r--contrib/epee/src/http_auth.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/contrib/epee/src/http_auth.cpp b/contrib/epee/src/http_auth.cpp
index 18ee18bd4..9f30e1975 100644
--- a/contrib/epee/src/http_auth.cpp
+++ b/contrib/epee/src/http_auth.cpp
@@ -209,12 +209,7 @@ namespace
}
template<typename T>
- using quoted_result = boost::joined_range<
- const boost::joined_range<const boost::string_ref, const T>, const boost::string_ref
- >;
-
- template<typename T>
- quoted_result<T> quoted(const T& arg)
+ auto quoted_(const T& arg) // avoid ADL selecting C++14 std::quoted
{
return boost::range::join(boost::range::join(ceref(u8"\""), arg), ceref(u8"\""));
}
@@ -242,13 +237,13 @@ namespace
{
str.append(u8"Digest ");
add_first_field(str, u8"algorithm", algorithm);
- add_field(str, u8"nonce", quoted(user.server.nonce));
- add_field(str, u8"realm", quoted(user.server.realm));
- add_field(str, u8"response", quoted(response));
- add_field(str, u8"uri", quoted(uri));
- add_field(str, u8"username", quoted(user.credentials.username));
+ add_field(str, u8"nonce", quoted_(user.server.nonce));
+ add_field(str, u8"realm", quoted_(user.server.realm));
+ add_field(str, u8"response", quoted_(response));
+ add_field(str, u8"uri", quoted_(uri));
+ add_field(str, u8"username", quoted_(user.credentials.username));
if (!user.server.opaque.empty())
- add_field(str, u8"opaque", quoted(user.server.opaque));
+ add_field(str, u8"opaque", quoted_(user.server.opaque));
}
//! Implements superseded algorithm specified in RFC 2069
@@ -674,8 +669,8 @@ namespace
Digest::name, (i == 0 ? boost::string_ref{} : sess_algo)
);
add_field(out, u8"algorithm", algorithm);
- add_field(out, u8"realm", quoted(auth_realm));
- add_field(out, u8"nonce", quoted(nonce));
+ add_field(out, u8"realm", quoted_(auth_realm));
+ add_field(out, u8"nonce", quoted_(nonce));
add_field(out, u8"stale", is_stale ? ceref("true") : ceref("false"));
fields.push_back(std::make_pair(std::string(server_auth_field), std::move(out)));