Use C++20. (#2322)

This commit is contained in:
Tejas Rao 2024-04-26 12:49:15 -07:00 committed by GitHub
commit 7fb8c76590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 29 additions and 16 deletions

View file

@ -7,6 +7,7 @@
#include "logging.h"
#include "utility.h"
#include <algorithm>
#include <sstream>
using namespace std::literals;
@ -169,7 +170,9 @@ namespace net {
addr_to_url_escaped_string(boost::asio::ip::address address) {
address = normalize_address(address);
if (address.is_v6()) {
return "["s + address.to_string() + ']';
std::stringstream ss;
ss << '[' << address.to_string() << ']';
return ss.str();
}
else {
return address.to_string();