mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Remove pre-C++17 shims (#1752)
Now that all compilers support C++17, remove some old C++14/C++17 shims.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/STLExtras.h"
|
||||
#include "wpi/SafeThread.h"
|
||||
#include "wpi/future.h"
|
||||
#include "wpi/uv/Async.h"
|
||||
@@ -107,7 +106,7 @@ class WorkerThreadThread : public SafeThread {
|
||||
template <typename R, typename... T>
|
||||
void RunWorkerThreadRequest(WorkerThreadThread<R, T...>& thr,
|
||||
WorkerThreadRequest<R, T...>& req) {
|
||||
R result = apply_tuple(req.work, std::move(req.params));
|
||||
R result = std::apply(req.work, std::move(req.params));
|
||||
if (req.afterWork) {
|
||||
if (auto async = thr.m_async.m_async.lock())
|
||||
async->Send(std::move(req.afterWork), std::move(result));
|
||||
@@ -119,7 +118,7 @@ void RunWorkerThreadRequest(WorkerThreadThread<R, T...>& thr,
|
||||
template <typename... T>
|
||||
void RunWorkerThreadRequest(WorkerThreadThread<void, T...>& thr,
|
||||
WorkerThreadRequest<void, T...>& req) {
|
||||
apply_tuple(req.work, req.params);
|
||||
std::apply(req.work, req.params);
|
||||
if (req.afterWork) {
|
||||
if (auto async = thr.m_async.m_async.lock())
|
||||
async->Send(std::move(req.afterWork));
|
||||
|
||||
Reference in New Issue
Block a user