From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99819 invoked by alias); 5 Oct 2016 02:16:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 99795 invoked by uid 89); 5 Oct 2016 02:16:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Mozilla X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Oct 2016 02:16:17 +0000 Received: from ball (unknown [IPv6:2607:f0c8:8000:80e0:56ee:75ff:fe52:afb9]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id C06DFC068; Wed, 5 Oct 2016 02:16:15 +0000 (UTC) Date: Wed, 05 Oct 2016 02:16:00 -0000 From: Trevor Saunders To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 19/22] Convert tid_range_parser to class Message-ID: <20161005022514.oy3yydizsqyk4enw@ball> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5cae4120-3581-b3ca-b323-44d8788e2916@redhat.com> User-Agent: NeoMutt/20160916 (1.7.0) X-SW-Source: 2016-10/txt/msg00072.txt.bz2 On Wed, Oct 05, 2016 at 12:09:13AM +0100, Pedro Alves wrote: > On 10/04/2016 08:24 PM, Pedro Alves wrote: > > > Anyway, I have to disappear now. Will continue later. > > Here's what I ended up with, after reading your version > in more detail. That brought in the "deleted" copy constructor/assignment > operators [1], and "const" in several methods, which I then propagated > to number_or_range_parser too. > > WDYT? > > [1] - I'm pondering making those use =delete if compiling with > a C++ compiler, behind some > > #define DISABLE_COPY_AND_ASSIGN(TYPE) ... > > macro. > > Or, maybe add a gdb::noncopyable class that non-copyable > classes inherit from privately, just like boost:noncopyable. > Anyone got experience on the latter, and whether that turns > out to be a bad idea? when Mozilla supported compilers without = delete there was a MOZ_DELETE macro that was defined to "= delete" when available, but I've never delt with the latter style. Trev