WPILibC++  2020.3.2-60-g3011ebe
Base.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 5
11 static_assert(0,
12  "GCC must be 5 or greater. If building for the roboRIO, please "
13  "update to the 2018 toolchains.");
14 #endif
15 
16 #if defined(_MSC_VER) && _MSC_VER < 1900
17 static_assert(0, "Visual Studio 2015 or greater required.");
18 #endif
19 
21 namespace frc {
22 
23 // A struct to use as a deleter when a std::shared_ptr must wrap a raw pointer
24 // that is being deleted by someone else.
25 template <class T>
26 struct NullDeleter {
27  void operator()(T*) const noexcept {};
28 };
29 
30 } // namespace frc
31 
32 // For backwards compatibility
33 #ifdef NO_NAMESPACED_WPILIB
34 using namespace frc; // NOLINT
35 #endif
frc::NullDeleter
Definition: Base.h:26
frc
A class that enforces constraints on the differential drive kinematics.
Definition: PDPSim.h:16