From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46474 invoked by alias); 10 Feb 2017 06:47:25 -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 46457 invoked by uid 89); 10 Feb 2017 06:47:23 -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,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2344, 11pm, 11PM 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; Fri, 10 Feb 2017 06:47:13 +0000 Received: from ball (unknown [IPv6:2607:f0c8:8000:80e0:56ee:75ff:fe52:afb9]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id A388DC085; Fri, 10 Feb 2017 06:47:11 +0000 (UTC) Date: Fri, 10 Feb 2017 06:47:00 -0000 From: Trevor Saunders To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 1/5] Remove some ui_out-related cleanups from Python Message-ID: <20170210065807.cskf2p42n23kncgz@ball> References: <20170115134253.24018-1-tom@tromey.com> <20170115134253.24018-2-tom@tromey.com> <20170116113021.sar3yh5ivykpqmbw@ball> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2017-02/txt/msg00248.txt.bz2 On Wed, Feb 08, 2017 at 05:28:11PM +0000, Pedro Alves wrote: > On 01/16/2017 11:30 AM, Trevor Saunders wrote: > >> +++ b/gdb/common/gdb_option.h > > > > might be nice to put it in include/ but fine to do that later when > > something else actually wants it. > > I've been thinking about putting all these utilities and > later-standards replacements we're coming up with in its own > directory/namespace. I had thought of "gtl", for "gdb template > library", or "gnu template library" if other projects want to > reuse it. (I think "gnu" is kind of taken by gnulib / libgnu.a) > One difficulty with putting such a thing at the top level is that > gdb relies on gnulib headers (that exist under gdb/) while > other toolchain components don't, yet, at least. yeah. I've been meaning to get to that too. I think for some of these things that may not matter, but for some I'm sure it does. > >> > + /* These aren't deleted in std::optional, but it was simpler to > >> > + delete them here, because currently the users of this class don't > >> > + need them, and making them depend on the definition of T is > >> > + somewhat complicated. */ > > I think you can make do most of it, but fair enough. > > > > Back around > I backported C++17's optional to C++11. I still have that branch > somewhere locally... /me finds it and pushes to github. Here: > > https://github.com/palves/gdb/commits/palves/gdb-import-gcc-optional > > This > contains the local changes I had made to to port it to C++11. I was surprised > that other than portable type traits stuff that's missing in C++11, the > only thing that C++11 loses is constexpr-ness in some cases. Now, > the result is of course much more code than what Tromey is proposing. > It probably does make sense to start with something simpler and > upgrade when/if we find a need. OTOH, looks like the current patch > doesn't have accessors for the wrapped value, so it seems like we'll > at least need to be extend it in that direction in no time. yeah, I think start small is a very reasonable approach, though I'd agree you'll want to get at the wrapped value pretty soon. Trev