This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 1/3] Introduce gdb::unique_ptr
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Monday, October 10, 2016 6:47 PM
> To: gdb-patches@sourceware.org
> Subject: [PATCH 1/3] Introduce gdb::unique_ptr
Hello Pedro,
> Many make_cleanup uses in the code base are best eliminated by using a
> "owning" smart pointer to manage ownership of the resource
> automatically.
>
> The question is _which_ smart pointer.
>
> We have std::auto_ptr in C++03, but, as is collective wisdom by now,
> that's too easy to misuse, and has therefore been deprecated in C++11
> and finally removed in C++17.
Would it make sense to switch to C++11, instead? Or delay this work until
we can make this move?
Thanks,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928