diff options
Diffstat (limited to 'gdb/common/gdb_unique_ptr.h')
-rw-r--r-- | gdb/common/gdb_unique_ptr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/common/gdb_unique_ptr.h b/gdb/common/gdb_unique_ptr.h index 327e127..a4be2bb 100644 --- a/gdb/common/gdb_unique_ptr.h +++ b/gdb/common/gdb_unique_ptr.h @@ -47,6 +47,13 @@ struct xfree_deleter<T[]> template<typename T> using unique_xmalloc_ptr = std::unique_ptr<T, xfree_deleter<T>>; +/* A no-op deleter. */ +template<typename T> +struct noop_deleter +{ + void operator() (T *ptr) const { } +}; + } /* namespace gdb */ #endif /* COMMON_GDB_UNIQUE_PTR_H */ |