From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78179 invoked by alias); 26 Oct 2017 20:30:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 78026 invoked by uid 89); 26 Oct 2017 20:30:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-Spam-User: qpsmtpd, 2 recipients 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, 26 Oct 2017 20:30:14 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 23E0A34C4; Thu, 26 Oct 2017 20:30:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 23E0A34C4 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jwakely@redhat.com Received: from localhost (unknown [10.33.36.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id A05ED5D969; Thu, 26 Oct 2017 20:30:09 +0000 (UTC) Date: Thu, 26 Oct 2017 20:37:00 -0000 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: Fix pretty printers for versioned namespace Message-ID: <20171026203008.GL9153@redhat.com> References: <29900c34-03ae-453d-3e96-401620b4f5c8@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <29900c34-03ae-453d-3e96-401620b4f5c8@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.1 (2017-09-22) X-SW-Source: 2017-10/txt/msg02004.txt.bz2 On 26/10/17 22:19 +0200, François Dumont wrote: >@@ -1232,7 +1232,7 @@ class Printer(object): > # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. > def add_container(self, base, name, function): > self.add_version(base, name, function) >- self.add_version(base + '__cxx1998::', name, function) >+ self.add_version(base, '__cxx1998::' + name, function) I don't like this change. Previously the arguments were the namespace(s) and the type. That's nice and simple. Now it's the first namespace, and then all the other namespaces and the type. That's not very clean. There must be a way to keep the add_version and add_container calls the same, and have it transparently handle the case where the namespace is 'std::__8::foo' not 'std::foo'.