Fix regression: cannot start with LD_PRELOAD=libSegFault.so (PR gdb/18653#c7)
[deliverable/binutils-gdb.git] / gdb / common / gdb_unique_ptr.h
index 4faadaf1c65fad1b1da612e0048d9a7e66e0aca6..c62e4f8820e01d5bafb0eefbabeb724d1414d376 100644 (file)
@@ -1,6 +1,6 @@
 /* std::unique_ptr specializations for GDB.
 
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -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.  */
 
This page took 0.033381 seconds and 4 git commands to generate.