diff options
Diffstat (limited to 'gdb/common')
-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 4faadaf..34c993c 100644 --- a/gdb/common/gdb_unique_ptr.h +++ b/gdb/common/gdb_unique_ptr.h @@ -34,6 +34,13 @@ struct xfree_deleter void operator() (T *ptr) const { xfree (ptr); } }; +/* Same, for arrays. */ +template <typename T> +struct xfree_deleter<T[]> +{ + void operator() (T *ptr) const { xfree (ptr); } +}; + /* Import the standard unique_ptr to our namespace with a custom deleter. */ |