This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 19/22] Convert tid_range_parser to class
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 13 Oct 2016 02:06:48 +0100
- Subject: Re: [RFA 19/22] Convert tid_range_parser to class
- Authentication-results: sourceware.org; auth=none
- References: <1474949330-4307-1-git-send-email-tom@tromey.com> <1474949330-4307-20-git-send-email-tom@tromey.com> <55f2924c-f8f9-6c06-ffbb-69079b6ffa62@redhat.com> <87shsha3bf.fsf@tromey.com> <926126cb-b3c5-340b-ac1c-5bc14ca41bf9@redhat.com> <42bd9696-cea5-5f39-ce03-1b223b5ed6fc@redhat.com> <5cae4120-3581-b3ca-b323-44d8788e2916@redhat.com> <87mvianwnl.fsf@tromey.com>
On 10/12/2016 03:11 AM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> Here's what I ended up with, after reading your version in more
> Pedro> detail. That brought in the "deleted" copy
> Pedro> constructor/assignment operators [1], and "const" in several
> Pedro> methods, which I then propagated to number_or_range_parser too.
>
> Pedro> WDYT?
>
> I'm sorry I didn't reply to this sooner.
> This all looks good to me.
OK, I've pushed it in now. Thanks!
> Pedro> [1] - I'm pondering making those use =delete if compiling with
> Pedro> a C++ compiler, behind some
> Pedro> #define DISABLE_COPY_AND_ASSIGN(TYPE) ...
> Pedro> macro.
>
> Pedro> Or, maybe add a gdb::noncopyable class that non-copyable
> Pedro> classes inherit from privately, just like boost:noncopyable.
> Pedro> Anyone got experience on the latter, and whether that turns
> Pedro> out to be a bad idea?
>
> I haven't used that.
> The Moz approach that Trevor mentioned seems reasonable.
> Or, just switching to C++11, per the other thread, and using =delete.
Yeah.
Thanks,
Pedro Alves