mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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:
@@ -163,7 +163,7 @@ void CommandScheduler::Schedule(Command* command) {
|
||||
}
|
||||
}
|
||||
|
||||
void CommandScheduler::Schedule(wpi::span<Command* const> commands) {
|
||||
void CommandScheduler::Schedule(std::span<Command* const> commands) {
|
||||
for (auto command : commands) {
|
||||
Schedule(command);
|
||||
}
|
||||
@@ -276,7 +276,7 @@ void CommandScheduler::RegisterSubsystem(
|
||||
}
|
||||
|
||||
void CommandScheduler::RegisterSubsystem(
|
||||
wpi::span<Subsystem* const> subsystems) {
|
||||
std::span<Subsystem* const> subsystems) {
|
||||
for (auto* subsystem : subsystems) {
|
||||
RegisterSubsystem(subsystem);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ void CommandScheduler::UnregisterSubsystem(
|
||||
}
|
||||
|
||||
void CommandScheduler::UnregisterSubsystem(
|
||||
wpi::span<Subsystem* const> subsystems) {
|
||||
std::span<Subsystem* const> subsystems) {
|
||||
for (auto* subsystem : subsystems) {
|
||||
UnregisterSubsystem(subsystem);
|
||||
}
|
||||
@@ -336,7 +336,7 @@ void CommandScheduler::Cancel(const CommandPtr& command) {
|
||||
Cancel(command.get());
|
||||
}
|
||||
|
||||
void CommandScheduler::Cancel(wpi::span<Command* const> commands) {
|
||||
void CommandScheduler::Cancel(std::span<Command* const> commands) {
|
||||
for (auto command : commands) {
|
||||
Cancel(command);
|
||||
}
|
||||
@@ -357,7 +357,7 @@ void CommandScheduler::CancelAll() {
|
||||
}
|
||||
|
||||
bool CommandScheduler::IsScheduled(
|
||||
wpi::span<const Command* const> commands) const {
|
||||
std::span<const Command* const> commands) const {
|
||||
for (auto command : commands) {
|
||||
if (!IsScheduled(command)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user