We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 264608b commit 1fe8d93Copy full SHA for 1fe8d93
include/libpmr/new.h
@@ -8,6 +8,7 @@
8
9
#include <cstddef>
10
#include <algorithm>
11
+#include <type_traits>
12
13
#include "libimp/aligned.h"
14
#include "libimp/uninitialized.h"
@@ -167,4 +168,13 @@ void $delete(T *p) noexcept {
167
168
#endif
169
}
170
171
+/// \brief The destruction policy used by std::unique_ptr.
172
+/// \see https://en.cppreference.com/w/cpp/memory/default_delete
173
+struct deleter {
174
+ template <typename T>
175
+ void operator()(T *p) const noexcept {
176
+ $delete(p);
177
+ }
178
+};
179
+
180
LIBPMR_NAMESPACE_END_
0 commit comments