This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 02/22] Use RAII to save and restore scalars
- From: Tom Tromey <tom at tromey dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, Trevor Saunders <tbsaunde at tbsaunde dot org>, gdb-patches at sourceware dot org
- Date: Fri, 30 Sep 2016 21:55:14 -0600
- Subject: Re: [RFA 02/22] Use RAII to save and restore scalars
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <firstname.lastname@example.org> <20160927085937.com7c7ct4wuchzpg@ball> <email@example.com> <firstname.lastname@example.org> <email@example.com>
>>>>> "Pedro" == Pedro Alves <firstname.lastname@example.org> writes:
Pedro> Guess we could have the copy constructor actually move instead of
Pedro> copy, setting the copied-from's pointer member to NULL, and then
Pedro> have the destructor do nothing if the pointer is NULL.
Yeah. I took this approach. I'm not super thrilled with it, but at the
same time it's not *too* bad.