You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
323 B
C++
17 lines
323 B
C++
// SPDX-License-Identifier: BSD-2-Clause
|
|
// author: Max Kellermann <max.kellermann@gmail.com>
|
|
|
|
#pragma once
|
|
|
|
/**
|
|
* A disposer for boost::intrusive that invokes the "delete" operator
|
|
* on the given pointer.
|
|
*/
|
|
class DeleteDisposer {
|
|
public:
|
|
template<typename T>
|
|
void operator()(T *t) const noexcept {
|
|
delete t;
|
|
}
|
|
};
|