From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id InW2NKPBlmHtWAAAWB0awg (envelope-from ) for ; Thu, 18 Nov 2021 16:12:03 -0500 Received: by simark.ca (Postfix, from userid 112) id C0C381F0C1; Thu, 18 Nov 2021 16:12:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9B4A91EDEE for ; Thu, 18 Nov 2021 16:12:02 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98C9A3857C4C for ; Thu, 18 Nov 2021 21:12:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98C9A3857C4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637269921; bh=UhUoDpw7VzrElOolGwDmmy9EHG5bZW4Ax7Sm/Mu+rls=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=bjTX7HFB4NHwzAOF9TMOP22WeoV70ZXBd/Xv5AdWAP1hXRDXD71BoAiWDrkcNekpb t3m2N9SF8So1SuyGm/3DYiw/dW9626QlzcW4rRcH7hftCWPk2p7qvxTId2AkN5JDtb Jh5KQ7AHszKY2CNKlu6ADdDOM3T1eUEpDvD8TQnQ= Received: from lndn.lancelotsix.com (vps-42846194.vps.ovh.net [IPv6:2001:41d0:801:2000::2400]) by sourceware.org (Postfix) with ESMTPS id D69013858422 for ; Thu, 18 Nov 2021 21:11:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D69013858422 Received: from ubuntu.lan (unknown [IPv6:2a02:390:9086::635]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 7D7B384624; Thu, 18 Nov 2021 21:11:41 +0000 (UTC) Date: Thu, 18 Nov 2021 21:11:32 +0000 To: Simon Marchi Subject: Re: [PATCH 2/2] gdb: fix array-view-selftests.c build with g++ 4.8 Message-ID: <20211118211132.sobuijcdi74wm4i7@ubuntu.lan> References: <20211118205053.2429353-1-simon.marchi@efficios.com> <20211118205053.2429353-2-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211118205053.2429353-2-simon.marchi@efficios.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Thu, 18 Nov 2021 21:11:41 +0000 (UTC) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, Nov 18, 2021 at 03:50:53PM -0500, Simon Marchi via Gdb-patches wrote: > When building with g++ 4.8, I get: > > CXX unittests/array-view-selftests.o > /home/smarchi/src/binutils-gdb/gdb/unittests/array-view-selftests.c:123:42: error: expected 'class' before 'Container' > template typename Container> > ^ > > I am no C++ template expert, but it looks like if I change "typename" for > "class", as the compiler kind of suggests, the code compiles. Indeed. Apparently 'typename' can be used instead of 'class' in a template template parameter only starting c++17[1]. Thanks for taking care of this. Lancelot. [1] https://en.cppreference.com/w/cpp/language/template_parameters#Template_template_parameter q> > Change-Id: I9c3edd29fb2b190069f0ce0dbf3bc3604d175f48 > --- > gdb/unittests/array-view-selftests.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/unittests/array-view-selftests.c b/gdb/unittests/array-view-selftests.c > index fe211a647b5..9df48db3912 100644 > --- a/gdb/unittests/array-view-selftests.c > +++ b/gdb/unittests/array-view-selftests.c > @@ -120,7 +120,7 @@ check () > /* Check that there's no container->view conversion for containers of derived > types or subclasses. */ > > -template typename Container> > +template class Container> > static constexpr bool > check_ctor_from_container () > { > -- > 2.33.1 >