public inbox for
 help / color / mirror / Atom feed
From: Jonathan Wakely <>
To: Jakub Jelinek <>
Subject: Re: [PATCH] libstdc++: Fix up <complex> for extended floating point types [PR107649]
Date: Wed, 16 Nov 2022 13:45:19 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

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<std::float128_t> 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)

  reply	other threads:[~2022-11-16 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 13:57 Jakub Jelinek
2022-11-16 13:42 ` Jonathan Wakely
2022-11-16 13:45   ` Jonathan Wakely [this message]
2022-11-16 13:47     ` Jakub Jelinek
2022-11-16 13:48       ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).