mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Upgrade to C++20 (#4239)
* Use explicit this capture required by C++20 * Use C++20 span * Replace wpi::numbers with std::numbers * Fix C++20 clang-tidy warning false positive in fmt * Remove ciso646 include since C++20 removed that header * Fix global-buffer-overflow asan warnings in ntcore tests * Add DIOSetProxy constructor to HAL * Upgrade MSVC compiler to 2022 * Bump native-utils to 2023.2.7 (changes to std=c++20) Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
This commit is contained in:
@@ -47,7 +47,7 @@ WebSocketServerHelper::WebSocketServerHelper(HttpParser& req) {
|
||||
}
|
||||
|
||||
std::pair<bool, std::string_view> WebSocketServerHelper::MatchProtocol(
|
||||
span<const std::string_view> protocols) {
|
||||
std::span<const std::string_view> protocols) {
|
||||
if (protocols.empty() && m_protocols.empty()) {
|
||||
return {true, {}};
|
||||
}
|
||||
@@ -62,7 +62,7 @@ std::pair<bool, std::string_view> WebSocketServerHelper::MatchProtocol(
|
||||
}
|
||||
|
||||
WebSocketServer::WebSocketServer(uv::Stream& stream,
|
||||
span<const std::string_view> protocols,
|
||||
std::span<const std::string_view> protocols,
|
||||
ServerOptions options, const private_init&)
|
||||
: m_stream{stream},
|
||||
m_helper{m_req},
|
||||
@@ -139,7 +139,7 @@ WebSocketServer::WebSocketServer(uv::Stream& stream,
|
||||
}
|
||||
|
||||
std::shared_ptr<WebSocketServer> WebSocketServer::Create(
|
||||
uv::Stream& stream, span<const std::string_view> protocols,
|
||||
uv::Stream& stream, std::span<const std::string_view> protocols,
|
||||
const ServerOptions& options) {
|
||||
auto server = std::make_shared<WebSocketServer>(stream, protocols, options,
|
||||
private_init{});
|
||||
|
||||
Reference in New Issue
Block a user