From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11387 invoked by alias); 30 Sep 2016 23:48:52 -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 8624 invoked by uid 89); 30 Sep 2016 23:11:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Yeah X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Sep 2016 23:11:34 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E067C008378; Fri, 30 Sep 2016 23:11:33 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8UNBUe2011353; Fri, 30 Sep 2016 19:11:31 -0400 Subject: Re: [RFA 02/22] Use RAII to save and restore scalars To: Tom Tromey References: <1474949330-4307-1-git-send-email-tom@tromey.com> <1474949330-4307-3-git-send-email-tom@tromey.com> <20160927085937.com7c7ct4wuchzpg@ball> <87wphta3kr.fsf@tromey.com> Cc: Trevor Saunders , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <34a0e76c-d123-cf94-b05d-1205e5ee96b9@redhat.com> Date: Fri, 30 Sep 2016 23:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87wphta3kr.fsf@tromey.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-09/txt/msg00444.txt.bz2 On 09/30/2016 03:02 PM, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> template > Pedro> scoped_restore_ make_scoped_restore (T *var) > Pedro> { > Pedro> return scoped_restore_ (var); > Pedro> } > > Yeah, I'll do this. I don't know why I didn't remember this when > writing the patches. Great, thanks. > > I'd also appreciate it if you could say whether you want "m_" member > naming. > Unless there's a good reason to deviate, I think it's a good idea to follow gcc's coding conventions. For that reason, my preference is to use "m_" for private data members. Thanks, Pedro Alves