public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>
Subject: Re: [PATCH] c++: Instantiate less when evaluating __is_convertible
Date: Mon, 26 Sep 2022 12:26:16 -0400	[thread overview]
Message-ID: <YzHSqM4XfqPo/j25@redhat.com> (raw)
In-Reply-To: <CACb0b4kiK564wT8c_NshoT=vZ_Q_qEFP2W_NJQicqzQV=c0UZg@mail.gmail.com>

On Mon, Sep 26, 2022 at 05:02:36PM +0100, Jonathan Wakely wrote:
> On Mon, 26 Sept 2022 at 16:23, Marek Polacek wrote:
> >
> > Jon reported that evaluating __is_convertible in this test leads to
> > instantiating char_traits<char>::eq, which is invalid (because we
> > are trying to call a member function on a char)
> 
> N.B. in the original code wasn't trying to do something dumb like call
> a member function on a char, but it was using basic_string_view<X>
> where X is a class type without an operator== and so
> char_traits<X>::eq was invalid. I changed it to just use
> basic_string_view<char> and changed char_traits::eq to do something
> different, that was invalid for char.

Ack.

> I can provide a less silly test case if you like, but I don't think it
> matters for the purposes of the testsuite.

I think no need to, I'm going to use Patrick's short test.

Thanks,

Marek


      reply	other threads:[~2022-09-26 16:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 15:22 Marek Polacek
2022-09-26 15:51 ` Patrick Palka
2022-09-26 16:21   ` Jason Merrill
2022-09-26 16:25   ` [PATCH v2] " Marek Polacek
2022-09-26 16:41     ` Jason Merrill
2022-09-26 16:02 ` [PATCH] " Jonathan Wakely
2022-09-26 16:26   ` Marek Polacek [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=YzHSqM4XfqPo/j25@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jwakely@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).