blob: 2d2e5a7ceb9e09224eefd81e33be9476438cf384 [file] [log] [blame]
Parker Schuhd3b7a8872018-02-19 16:42:27 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008-2017. 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
Parker Schuhd3b7a8872018-02-19 16:42:27 -080010namespace frc {
11
12// A struct to use as a deleter when a std::shared_ptr must wrap a raw pointer
13// that is being deleted by someone else.
14template <class T>
15struct NullDeleter {
16 void operator()(T *) const noexcept {};
17};
18
19} // namespace frc