Use C++20. (#2322)

This commit is contained in:
Tejas Rao
2024-04-26 12:49:15 -07:00
committed by GitHub
parent 9288775351
commit 7fb8c76590
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();