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 547A9395A07A for ; Wed, 16 Nov 2022 13:45:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 547A9395A07A 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=1668606334; 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=aGgQ/KhxfPwJyLt6e3pdvkqselOUr09QSTq0+EYbtdbwbIoSU/LsE5EljZAGqYs3QRpuEn tdhwU1ZTMh66tqRRWdrt77ycKJYyUwBUJnGNbbAQrvvFTYjfsK7O9HK0QU/OTftJRl80f5 VfcoFYZk/JOWWkUNdE/yWng8ReazNiA= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-140-QV5261tzMd6qp8cfu95hCw-1; Wed, 16 Nov 2022 08:45:31 -0500 X-MC-Unique: QV5261tzMd6qp8cfu95hCw-1 Received: by mail-ed1-f69.google.com with SMTP id f20-20020a0564021e9400b00461ea0ce17cso12410368edf.16 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=BMDUN/GacV6zAoBNl1D/DtveEGUH2vEQqJk6TroKJ1titaYVCEhRrw9YCXRXDmp8ia DgJ+6BehYBarxPwVLoRQdHngrZbpaJVaOVkqDKKuijdsavTnX4uC2wxTFH0XQXnBqTi4 vNY3youfadAgjRRA+CgJSAzSOmFp+kWCgs3nEiqbiX0Y752ZMhr4JxktpVHHk8celIZp 2FEQ5dGowFAa72v39xmMHDy6lbdn2EFYca46Z8FLAfhwPdEyz0HJuE+TWs5BpN7ShsW6 D8ACHekz2ueKlff5etKu13mobM2GQNg50wzvQGZBTjcmLZ/1xaWRa1AvLMjvGJjIS7Lj 2TjQ== X-Gm-Message-State: ANoB5pmL5S8bcbADax6fpou41w4iRabTkh5Z4s/Q25qNMXIuO4lUWE9E SiRzDOWft9MePrr91p7ALwSVNcN+gLxxTOsGS/dlSijVPsx/ic+GsPHwv4FF4csf5Yn95BC9Ldw ViakggXbCU0z81urV1T+NBJiVR5ooAj8= X-Received: by 2002:a17:907:9258:b0:78d:8dfb:10ad with SMTP id kb24-20020a170907925800b0078d8dfb10admr18728111ejb.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.7 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=unavailable 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--