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 52E87395A07A for ; Wed, 16 Nov 2022 13:45:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 52E87395A07A 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=1668606333; h=from:from: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=DC1U2be0CPZE1amDKKsytDtz2jygIBP0DgO9Z8FkrKE=; b=dHrhith92mtO60iU8rO7M17GaYm1E+t6cOCDUaj6umVzPKojtnjj4t8sinlpWqjEz7D4XP QbvUVGNsLlEA/ipVnEGlOK00S0wyoYo6s9YixYb/yjwC7hnYh35HtOrDcok3UqUSJ73j6M GKbCkI7Oq+r9D8mfCpheuUzH8KmDxos= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-64-CDT5T7EwPWOkC_uANkg8VA-1; Wed, 16 Nov 2022 08:45:31 -0500 X-MC-Unique: CDT5T7EwPWOkC_uANkg8VA-1 Received: by mail-ed1-f70.google.com with SMTP id c9-20020a05640227c900b00463de74bc15so12485670ede.13 for ; Wed, 16 Nov 2022 05:45:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DC1U2be0CPZE1amDKKsytDtz2jygIBP0DgO9Z8FkrKE=; b=JBIleAMQlNHIaJjOJcxhPrukPEKK78nKXOoNNGlAp8ufOMozHsk/zEBLKHi5Okeuhf d/K3ARGb3jlJ3+rLCmOTvXd4p33qSmNvxaRLhR/3yAoG4LtBAXoPyxRccPtz4TDRsqvh j1XngJYrflEUayQ8qtG2RybHtxTA8QKuS1GYpDTuwOsBvC7J3dFrn2+GvDyWMRe+BXp+ kdleQblPC6+c9JcrrQxEW6nLi959P2j5hZBWFYtIGjp30Na4Qj25bdpGsgIoYzNn+aNE 8lUcVMcAeG+eCpqy66Gu/bBIyfGpGrmWZTcg12zdMVuyoHrX0f4vzWxBuJwlCVXbaE0B +TXA== X-Gm-Message-State: ANoB5plH0CgmfMib630py9GHt6T3dAjZxPblR1HDuz6gfDm4q54aVUAe +HFBEz2CuvIUj6VPwA7Vv4wQ1Z128u6bTnDUbny8jMtUjsN4M2tx/6XTIbGnPBUCIad6XcogB9a swKQN1A2xr4EmZxji5UwjL38R4tBUfira9w== X-Received: by 2002:a17:907:9258:b0:78d:8dfb:10ad with SMTP id kb24-20020a170907925800b0078d8dfb10admr18728109ejb.289.1668606330408; Wed, 16 Nov 2022 05:45:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf79zyLec2DSczcWgOX2R8Wt4VtajivfELopo4ghFUV0BirdTOE26FQYW0MCUrfdlMu8A4TiuMRxgnIUAY/7Q6E= X-Received: by 2002:a17:907:9258:b0:78d:8dfb:10ad with SMTP id kb24-20020a170907925800b0078d8dfb10admr18728084ejb.289.1668606330226; Wed, 16 Nov 2022 05:45:30 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 16 Nov 2022 13:45:19 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Fix up for extended floating point types [PR107649] To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000095608f05ed96af83" X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,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: --00000000000095608f05ed96af83 Content-Type: text/plain; charset="UTF-8" On Wed, 16 Nov 2022 at 13:42, 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. (It's fixed on Clang trunk, so will be in 16.0.0) --00000000000095608f05ed96af83--