mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01: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:
@@ -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