public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Marek Polacek <polacek@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 17:02:36 +0100	[thread overview]
Message-ID: <CACb0b4kiK564wT8c_NshoT=vZ_Q_qEFP2W_NJQicqzQV=c0UZg@mail.gmail.com> (raw)
In-Reply-To: <20220926152258.20921-1-polacek@redhat.com>

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.

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


  parent reply	other threads:[~2022-09-26 16:02 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 ` Jonathan Wakely [this message]
2022-09-26 16:26   ` [PATCH] " Marek Polacek

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='CACb0b4kiK564wT8c_NshoT=vZ_Q_qEFP2W_NJQicqzQV=c0UZg@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=polacek@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).