[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:
Tyler Veness
2023-06-08 19:59:54 -07:00
committed by GitHub
parent 6414be0e5d
commit 652d1c44e3
51 changed files with 86 additions and 119 deletions

View File

@@ -4,10 +4,9 @@
#pragma once
#include <concepts>
#include <type_traits>
#include "wpi/concepts.h"
namespace wpi {
template <class Derived, class Base>

View File

@@ -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 {};

View File

@@ -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)

View File

@@ -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"

View File

@@ -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 {
/**