From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48469 invoked by alias); 23 Feb 2017 15:20:59 -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 47121 invoked by uid 89); 23 Feb 2017 15:20:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:86efypa, H*i:sk:86efypa, H*f:sk:dbc56fc, H*f:sk:86efypa 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; Thu, 23 Feb 2017 15:20:57 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 801023A7697; Thu, 23 Feb 2017 15:20:57 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C7B8B6FFE; Thu, 23 Feb 2017 15:20:56 +0000 (UTC) Subject: Re: [PATCH v1.1 1/3] Introduce gdb::function_view To: Yao Qi References: <1487775033-32699-1-git-send-email-palves@redhat.com> <1487775033-32699-2-git-send-email-palves@redhat.com> <8636f39b5e1e2cbdeabbf8dfd999e709@polymtl.ca> <4c8528d8-0115-3bf3-0a16-42f44be580a9@redhat.com> <20baebcd-0f6a-89ca-ef34-503795171d43@redhat.com> <20170222221158.hqfnyyvyqqxetygk@localhost> <86efypaqmy.fsf@gmail.com> Cc: Simon Marchi , gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Thu, 23 Feb 2017 15:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <86efypaqmy.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00629.txt.bz2 On 02/23/2017 03:11 PM, Yao Qi wrote: > Pedro Alves writes: > >> I think putting these new things in _some_ namespace is the >> right thing to do. gdb is just the no-brainer namespace name. > > Yes, that right. > >> >> IMO, _all_ of GDB should be under "namespace gdb". Then these utilities >> would either be put in "namespace gdb" too, or in a "namespace gtl", >> for "gdb template library" or something like that. Or we could >> put them under "gtl" already. > > IMO, "gdb template library" or "gtl" is project name, but it doesn't fit > well as a namespace name. I like "gdb::utils" :). "gdb::utils::function_view" is maybe a bit too long for code that is going to end up used a lot, though. "gdb::function_view" or "gtl::function_view" also has the "advantage" that replacing "gdb" with "std" at some point does not require reindenting the code. (e.g., gdb::optional -> std::optional when we get to C++17). 1/2 :-) I think the easiest is to keep using "gdb" for now, and revisit if/when we move everything under gdb. Thanks, Pedro Alves