diff --git a/hal/src/main/native/athena/Interrupts.cpp b/hal/src/main/native/athena/Interrupts.cpp index 049fc3e541..9139dce9db 100644 --- a/hal/src/main/native/athena/Interrupts.cpp +++ b/hal/src/main/native/athena/Interrupts.cpp @@ -14,7 +14,6 @@ #include "DigitalInternal.h" #include "HAL/ChipObject.h" #include "HAL/Errors.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/HandlesInternal.h" #include "HAL/handles/LimitedHandleResource.h" #include "PortsInternal.h" diff --git a/hal/src/main/native/athena/Notifier.cpp b/hal/src/main/native/athena/Notifier.cpp index 4831f2cadf..abe9f40ea2 100644 --- a/hal/src/main/native/athena/Notifier.cpp +++ b/hal/src/main/native/athena/Notifier.cpp @@ -17,7 +17,6 @@ #include "HAL/ChipObject.h" #include "HAL/Errors.h" #include "HAL/HAL.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/UnlimitedHandleResource.h" using namespace hal; diff --git a/hal/src/main/native/athena/PCMInternal.cpp b/hal/src/main/native/athena/PCMInternal.cpp index eedc611854..8468cc8bda 100644 --- a/hal/src/main/native/athena/PCMInternal.cpp +++ b/hal/src/main/native/athena/PCMInternal.cpp @@ -9,7 +9,6 @@ #include "HAL/Errors.h" #include "HAL/Solenoid.h" -#include "HAL/cpp/make_unique.h" #include "PortsInternal.h" namespace hal { diff --git a/hal/src/main/native/athena/PDP.cpp b/hal/src/main/native/athena/PDP.cpp index b0b0dd13f2..97dba0ac78 100644 --- a/hal/src/main/native/athena/PDP.cpp +++ b/hal/src/main/native/athena/PDP.cpp @@ -11,7 +11,6 @@ #include "HAL/Errors.h" #include "HAL/Ports.h" -#include "HAL/cpp/make_unique.h" #include "PortsInternal.h" #include "ctre/PDP.h" diff --git a/hal/src/main/native/athena/SPI.cpp b/hal/src/main/native/athena/SPI.cpp index 6c89419fa8..c3b1575cf0 100644 --- a/hal/src/main/native/athena/SPI.cpp +++ b/hal/src/main/native/athena/SPI.cpp @@ -22,7 +22,6 @@ #include "DigitalInternal.h" #include "HAL/DIO.h" #include "HAL/HAL.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/HandlesInternal.h" using namespace hal; diff --git a/hal/src/main/native/include/HAL/cpp/make_unique.h b/hal/src/main/native/include/HAL/cpp/make_unique.h deleted file mode 100644 index ffc2d6f452..0000000000 --- a/hal/src/main/native/include/HAL/cpp/make_unique.h +++ /dev/null @@ -1,47 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) 2016-2018 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. */ -/*----------------------------------------------------------------------------*/ - -#pragma once - -// Define make_unique for C++11-only compilers -#if __cplusplus == 201103L -#include -#include -#include -#include - -namespace std { -template -struct _Unique_if { - typedef unique_ptr _Single_object; -}; - -template -struct _Unique_if { - typedef unique_ptr _Unknown_bound; -}; - -template -struct _Unique_if { - typedef void _Known_bound; -}; - -template -typename _Unique_if::_Single_object make_unique(Args&&... args) { - return unique_ptr(new T(std::forward(args)...)); -} - -template -typename _Unique_if::_Unknown_bound make_unique(size_t n) { - typedef typename remove_extent::type U; - return unique_ptr(new U[n]()); -} - -template -typename _Unique_if::_Known_bound make_unique(Args&&...) = delete; -} // namespace std -#endif diff --git a/hal/src/main/native/include/HAL/handles/DigitalHandleResource.h b/hal/src/main/native/include/HAL/handles/DigitalHandleResource.h index 58d64dd3d7..305ce03157 100644 --- a/hal/src/main/native/include/HAL/handles/DigitalHandleResource.h +++ b/hal/src/main/native/include/HAL/handles/DigitalHandleResource.h @@ -16,7 +16,6 @@ #include "HAL/Errors.h" #include "HAL/Types.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/HandlesInternal.h" namespace hal { diff --git a/hal/src/main/native/include/HAL/handles/IndexedClassedHandleResource.h b/hal/src/main/native/include/HAL/handles/IndexedClassedHandleResource.h index d3b495bc6d..62b55a3f91 100644 --- a/hal/src/main/native/include/HAL/handles/IndexedClassedHandleResource.h +++ b/hal/src/main/native/include/HAL/handles/IndexedClassedHandleResource.h @@ -17,7 +17,6 @@ #include "HAL/Errors.h" #include "HAL/Types.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/HandlesInternal.h" namespace hal { diff --git a/hal/src/main/native/include/HAL/handles/IndexedHandleResource.h b/hal/src/main/native/include/HAL/handles/IndexedHandleResource.h index 79f78fd5a3..a320b2b015 100644 --- a/hal/src/main/native/include/HAL/handles/IndexedHandleResource.h +++ b/hal/src/main/native/include/HAL/handles/IndexedHandleResource.h @@ -16,7 +16,6 @@ #include "HAL/Errors.h" #include "HAL/Types.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/HandlesInternal.h" namespace hal { diff --git a/hal/src/main/native/include/HAL/handles/LimitedClassedHandleResource.h b/hal/src/main/native/include/HAL/handles/LimitedClassedHandleResource.h index cee698d561..8f7a4a568b 100644 --- a/hal/src/main/native/include/HAL/handles/LimitedClassedHandleResource.h +++ b/hal/src/main/native/include/HAL/handles/LimitedClassedHandleResource.h @@ -15,7 +15,6 @@ #include #include "HAL/Types.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/HandlesInternal.h" namespace hal { diff --git a/hal/src/main/native/include/HAL/handles/LimitedHandleResource.h b/hal/src/main/native/include/HAL/handles/LimitedHandleResource.h index b6c6e4bc06..8fbc1b0272 100644 --- a/hal/src/main/native/include/HAL/handles/LimitedHandleResource.h +++ b/hal/src/main/native/include/HAL/handles/LimitedHandleResource.h @@ -15,7 +15,6 @@ #include #include "HAL/Types.h" -#include "HAL/cpp/make_unique.h" #include "HandlesInternal.h" namespace hal { diff --git a/hal/src/main/native/sim/MockData/DriverStationData.cpp b/hal/src/main/native/sim/MockData/DriverStationData.cpp index c88f8b6144..811fa1303c 100644 --- a/hal/src/main/native/sim/MockData/DriverStationData.cpp +++ b/hal/src/main/native/sim/MockData/DriverStationData.cpp @@ -10,7 +10,6 @@ #include #include "DriverStationDataInternal.h" -#include "HAL/cpp/make_unique.h" #include "MockData/NotifyCallbackHelpers.h" namespace hal { diff --git a/hal/src/main/native/sim/Notifier.cpp b/hal/src/main/native/sim/Notifier.cpp index 59cd8c384a..f975a58c0a 100644 --- a/hal/src/main/native/sim/Notifier.cpp +++ b/hal/src/main/native/sim/Notifier.cpp @@ -15,7 +15,6 @@ #include "HAL/HAL.h" #include "HAL/cpp/fpga_clock.h" -#include "HAL/cpp/make_unique.h" #include "HAL/handles/UnlimitedHandleResource.h" namespace { diff --git a/wpilibc/src/main/native/include/Base.h b/wpilibc/src/main/native/include/Base.h index 15786e3357..53cd8ef101 100644 --- a/wpilibc/src/main/native/include/Base.h +++ b/wpilibc/src/main/native/include/Base.h @@ -17,8 +17,6 @@ static_assert(0, static_assert(0, "Visual Studio 2015 or greater required."); #endif -#include - #define DEFAULT_MOVE_CONSTRUCTOR(ClassName) ClassName(ClassName&&) = default namespace frc {