From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 53884395A07C for ; Wed, 16 Nov 2022 13:47:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 53884395A07C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668606474; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=Whg/7g8+StQOZRSX6+ISC1aITVL14yR3pyoZ98VL4kM=; b=h9ynTjvZV6tAlclXXIaap0k4IeKDPpA03bjdOTkBik3PFWiEMcOAp/+IRpuWFjp2zzkSUn 3/XssA716xdIa5MvE2N7UX1q+dov3sLCX0m7UzuZDPZJl8QQLfeZwHHYFK6+vxsVaycUSU /nfh3JtbWQzo35YUJ7p9BYOyF5vao7o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-536-t8g1Ifz9Mcev3k-18svZdw-1; Wed, 16 Nov 2022 08:47:50 -0500 X-MC-Unique: t8g1Ifz9Mcev3k-18svZdw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0EE5833A11; Wed, 16 Nov 2022 13:47:49 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 431FB2027061; Wed, 16 Nov 2022 13:47:48 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2AGDlh8Q2463968 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 14:47:44 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2AGDlhsS2463967; Wed, 16 Nov 2022 14:47:43 +0100 Date: Wed, 16 Nov 2022 14:47:42 +0100 From: Jakub Jelinek To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Fix up for extended floating point types [PR107649] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Nov 16, 2022 at 01:45:19PM +0000, Jonathan Wakely wrote: > > On Mon, 14 Nov 2022 at 13:57, Jakub Jelinek wrote: > > > >> Hi! > >> > >> As filed by Jonathan in the PR, I've screwed up the requires syntax > >> in the extended floating point specialization: > >> - requires(__complex_type<_Tp>::type) > >> + requires requires { typename __complex_type<_Tp>::type; } > >> and doing this change resulted in lots of errors because > >> __complex_whatever > >> overfloads from extended floating point types were declared after the > >> templates which used them. > >> > >> The following patch fixes that. > >> > >> Bootstrapped/regtested on x86_64-linux and i686-linux, additionally > >> I've tested that with _GLIBCXX_HAVE_FLOAT128_MATH not being defined > >> while __STDCPP_FLOAT128_T__ defined one can still use > >> std::complex for basic arithmetic etc., just one can't > >> expect std::sin etc. to work in that case (because we don't have any > >> implementation). > >> > >> Ok for trunk? > >> > > > > OK, thanks for the quick fix. > > > > Oh, also no released version of Clang can handle the C++20 rules about > 'typename' yet, so we get this error: > > complex:1843:15: error: no template named 'type' in '__complex_ty > pe<_Tp>'; did you mean 'ctype'? > typedef std::__complex_type<_Tp>::type _ComplexT; > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > It needs a 'typename' after 'typedef'. > > I can add that if you want though. Can you? Sorry, I have already committed the patch before noticing your mail. Jakub