mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] Upgrade to macOS 12 to remove concept shims (#5379)
The macOS deployment target has been upgraded from 10.15 to 11. Also, a deprecation warning for sprintf() in libuv was suppressed.
This commit is contained in:
2
.github/workflows/cmake.yml
vendored
2
.github/workflows/cmake.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
name: Linux
|
||||
container: wpilib/roborio-cross-ubuntu:2023-22.04
|
||||
flags: ""
|
||||
- os: macOS-11
|
||||
- os: macOS-12
|
||||
name: macOS
|
||||
container: ""
|
||||
flags: "-DWITH_JAVA=OFF"
|
||||
|
||||
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
build-host:
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.15
|
||||
MACOSX_DEPLOYMENT_TARGET: 11
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
build-options: "-PciReleaseOnly --max-workers 1"
|
||||
task: "copyAllOutputs"
|
||||
outputs: "build/allOutputs"
|
||||
- os: macOS-11
|
||||
- os: macOS-12
|
||||
artifact-name: macOS
|
||||
architecture: x64
|
||||
task: "build"
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
#include "glass/Storage.h"
|
||||
|
||||
#include <concepts>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <wpi/StringExtras.h>
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/json.h>
|
||||
|
||||
using namespace glass;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "glass/networktables/NetworkTables.h"
|
||||
|
||||
#include <cinttypes>
|
||||
#include <concepts>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <initializer_list>
|
||||
@@ -24,7 +25,6 @@
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/SpanExtras.h>
|
||||
#include <wpi/StringExtras.h>
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/mpack.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include "WireDecoder.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <concepts>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <wpi/Logger.h>
|
||||
#include <wpi/SpanExtras.h>
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/json.h>
|
||||
#include <wpi/mpack.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <concepts>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
#include <span>
|
||||
@@ -15,8 +16,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "ntcore_c.h"
|
||||
|
||||
namespace nt {
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <concepts>
|
||||
#include <span>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "../MockLogger.h"
|
||||
#include "../PubSubOptionsMatcher.h"
|
||||
#include "../SpanMatcher.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 26 Apr 2022 15:01:25 -0400
|
||||
Subject: [PATCH 1/9] Fix missing casts
|
||||
Subject: [PATCH 01/10] Fix missing casts
|
||||
|
||||
---
|
||||
include/uv/unix.h | 2 +-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 26 Apr 2022 15:09:43 -0400
|
||||
Subject: [PATCH 2/9] Fix warnings
|
||||
Subject: [PATCH 02/10] Fix warnings
|
||||
|
||||
---
|
||||
include/uv/win.h | 5 +++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 26 Apr 2022 15:19:14 -0400
|
||||
Subject: [PATCH 3/9] Preprocessor cleanup
|
||||
Subject: [PATCH 03/10] Preprocessor cleanup
|
||||
|
||||
---
|
||||
include/uv.h | 18 +-----------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 26 Apr 2022 15:24:47 -0400
|
||||
Subject: [PATCH 4/9] Cleanup problematic language
|
||||
Subject: [PATCH 04/10] Cleanup problematic language
|
||||
|
||||
---
|
||||
src/unix/tty.c | 21 +++++++++++----------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 26 Apr 2022 15:26:03 -0400
|
||||
Subject: [PATCH 5/9] Use roborio time
|
||||
Subject: [PATCH 05/10] Use roborio time
|
||||
|
||||
---
|
||||
src/unix/linux-core.c | 8 ++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 26 Apr 2022 15:28:52 -0400
|
||||
Subject: [PATCH 6/9] Style / comments cleanup
|
||||
Subject: [PATCH 06/10] Style / comments cleanup
|
||||
|
||||
---
|
||||
src/fs-poll.c | 1 +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Tue, 17 May 2022 21:36:57 -0700
|
||||
Subject: [PATCH 7/9] Squelch GCC warnings we don't know how to fix
|
||||
Subject: [PATCH 07/10] Squelch GCC warnings we don't know how to fix
|
||||
|
||||
---
|
||||
src/queue.h | 16 ++++++++++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Sat, 21 May 2022 22:58:06 -0700
|
||||
Subject: [PATCH 8/9] Fix Win32 warning suppression pragma
|
||||
Subject: [PATCH 08/10] Fix Win32 warning suppression pragma
|
||||
|
||||
---
|
||||
src/win/util.c | 2 +-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Johnson <johnson.peter@gmail.com>
|
||||
Date: Sun, 5 Jun 2022 15:40:35 -0700
|
||||
Subject: [PATCH 9/9] Avoid unused variable warning on Mac
|
||||
Subject: [PATCH 09/10] Avoid unused variable warning on Mac
|
||||
|
||||
---
|
||||
src/unix/darwin.c | 1 +
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Wed, 7 Jun 2023 21:04:19 -0700
|
||||
Subject: [PATCH 10/10] Squelch Apple Clang sprintf deprecation warning
|
||||
|
||||
---
|
||||
src/inet.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/inet.c b/src/inet.c
|
||||
index 1b190255ed5f4813428dbb3ba81a50cfd26c5bf1..57e5c042ef8adb880279f94bcccc70f78df338fc 100644
|
||||
--- a/src/inet.c
|
||||
+++ b/src/inet.c
|
||||
@@ -139,7 +139,14 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
|
||||
tp += strlen(tp);
|
||||
break;
|
||||
}
|
||||
+#if defined(__APPLE__) && defined(__clang__)
|
||||
+#pragma clang diagnostic push
|
||||
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
+#endif // defined(__APPLE__) && defined(__clang__)
|
||||
tp += sprintf(tp, "%x", words[i]);
|
||||
+#if defined(__APPLE__) && defined(__clang__)
|
||||
+#pragma clang diagnostic pop
|
||||
+#endif // defined(__APPLE__) && defined(__clang__)
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words))
|
||||
@@ -29,6 +29,7 @@ def main():
|
||||
"0007-Squelch-GCC-warnings-we-don-t-know-how-to-fix.patch",
|
||||
"0008-Fix-Win32-warning-suppression-pragma.patch",
|
||||
"0009-Avoid-unused-variable-warning-on-Mac.patch",
|
||||
"0010-Squelch-Apple-Clang-sprintf-deprecation-warning.patch",
|
||||
]:
|
||||
git_am(os.path.join(wpilib_root, "upstream_utils/libuv_patches", f))
|
||||
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/Command.h"
|
||||
#include "frc2/command/CommandPtr.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
@@ -12,8 +13,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
|
||||
namespace frc2 {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
#include <span>
|
||||
@@ -15,7 +16,6 @@
|
||||
#include <networktables/NTSendable.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/FunctionExtras.h>
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/sendable/SendableHelper.h>
|
||||
|
||||
namespace frc2 {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
@@ -13,8 +14,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandPtr.h"
|
||||
#include "frc2/command/SelectCommand.h"
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/DecayedDerivedFrom.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandGroupBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/DecayedDerivedFrom.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandGroupBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/DecayedDerivedFrom.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandGroupBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/deprecated.h>
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <span>
|
||||
@@ -17,7 +18,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/DecayedDerivedFrom.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandGroupBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandScheduler.h"
|
||||
|
||||
namespace frc2 {
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
#pragma warning(disable : 4521)
|
||||
#endif
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <span>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#include "Trigger.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
@@ -14,7 +15,6 @@
|
||||
#include <frc/event/EventLoop.h>
|
||||
#include <frc/filter/Debouncer.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc2/command/Command.h"
|
||||
#include "frc2/command/CommandScheduler.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
@@ -14,7 +15,6 @@
|
||||
|
||||
#include <hal/Types.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
namespace frc {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
@@ -12,7 +13,6 @@
|
||||
|
||||
#include <networktables/NetworkTable.h>
|
||||
#include <wpi/StringMap.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc/Errors.h"
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <wpi/StringMap.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc/smartdashboard/SendableChooserBase.h"
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <concepts>
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#include "Eigen/Eigenvalues"
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "Eigen/Core"
|
||||
#include "Eigen/SparseCore"
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <cstddef>
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
#include <wpi/array.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "Eigen/QR"
|
||||
#include "frc/EigenCore.h"
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc/system/LinearSystem.h"
|
||||
#include "frc/system/plant/DCMotor.h"
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc/kinematics/DifferentialDriveKinematics.h"
|
||||
#include "frc/kinematics/MecanumDriveKinematics.h"
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <limits>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc/geometry/Rotation2d.h"
|
||||
#include "frc/geometry/Translation2d.h"
|
||||
#include "frc/trajectory/constraint/TrajectoryConstraint.h"
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <limits>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
|
||||
#include "frc/geometry/Rotation2d.h"
|
||||
#include "frc/geometry/Translation2d.h"
|
||||
#include "frc/trajectory/constraint/TrajectoryConstraint.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <stdint.h>
|
||||
#include <uv.h>
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
@@ -15,7 +16,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/concepts.h>
|
||||
#include <wpi/future.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
|
||||
@@ -139,7 +139,14 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
|
||||
tp += strlen(tp);
|
||||
break;
|
||||
}
|
||||
#if defined(__APPLE__) && defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif // defined(__APPLE__) && defined(__clang__)
|
||||
tp += sprintf(tp, "%x", words[i]);
|
||||
#if defined(__APPLE__) && defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif // defined(__APPLE__) && defined(__clang__)
|
||||
}
|
||||
/* Was it a trailing run of 0x00's? */
|
||||
if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words))
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <type_traits>
|
||||
|
||||
#include "wpi/concepts.h"
|
||||
|
||||
namespace wpi {
|
||||
|
||||
template <class Derived, class Base>
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <concepts>
|
||||
#include <cstddef>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/concepts.h"
|
||||
|
||||
namespace wpi {
|
||||
|
||||
struct empty_array_t {};
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
|
||||
#if defined(__APPLE__) && !defined(__cpp_lib_concepts)
|
||||
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace std {
|
||||
|
||||
template <typename T, typename... Args>
|
||||
concept constructible_from =
|
||||
is_nothrow_destructible_v<T> && is_constructible_v<T, Args...>;
|
||||
|
||||
template <typename From, typename To>
|
||||
concept convertible_to = is_convertible_v<From, To> &&
|
||||
requires { static_cast<To>(declval<From>()); };
|
||||
|
||||
template <typename T>
|
||||
concept move_constructible = constructible_from<T, T> && convertible_to<T, T>;
|
||||
|
||||
template <typename T>
|
||||
concept copy_constructible =
|
||||
move_constructible<T> && constructible_from<T, T&> &&
|
||||
convertible_to<T&, T> && constructible_from<T, const T&> &&
|
||||
convertible_to<const T&, T> && constructible_from<T, const T> &&
|
||||
convertible_to<const T, T>;
|
||||
|
||||
template <typename T>
|
||||
concept default_initializable =
|
||||
constructible_from<T> && requires { T{}; } && requires { ::new T; };
|
||||
|
||||
template <typename Derived, typename Base>
|
||||
concept derived_from =
|
||||
is_base_of_v<Base, Derived> &&
|
||||
is_convertible_v<const volatile Derived*, const volatile Base*>;
|
||||
|
||||
template <typename T>
|
||||
concept floating_point = is_floating_point_v<T>;
|
||||
|
||||
template <typename T>
|
||||
concept integral = is_integral_v<T>;
|
||||
|
||||
template <typename F, typename... Args>
|
||||
concept invocable = requires(F&& f, Args&&... args) {
|
||||
invoke(forward<F>(f), forward<Args>(args)...);
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // defined(__APPLE__) && !defined(__cpp_lib_concepts)
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <concepts>
|
||||
#include <queue>
|
||||
#include <span>
|
||||
#include <string>
|
||||
@@ -19,7 +20,6 @@
|
||||
#include "wpi/SmallString.h"
|
||||
#include "wpi/SmallVector.h"
|
||||
#include "wpi/StringExtras.h"
|
||||
#include "wpi/concepts.h"
|
||||
#include "wpi/mutex.h"
|
||||
#include "wpi/raw_ostream.h"
|
||||
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
#define WPIUTIL_WPI_PRIORITY_QUEUE_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/concepts.h"
|
||||
|
||||
namespace wpi {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user