public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/84075] [11/12/13/14 Regression] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’
Date: Mon, 18 Sep 2023 18:41:17 +0000	[thread overview]
Message-ID: <bug-84075-4-hxQqevrlVW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-84075-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:155178ccb5f5bc89dcc8261ae1b64bc2fbfdbd45

commit r14-4109-g155178ccb5f5bc89dcc8261ae1b64bc2fbfdbd45
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Sep 18 14:41:05 2023 -0400

    c++: always check arity before deduction

    This simple patch extends the r12-3271-gf1e73199569287 optimization
    to happen for deduction without explicit template arguments as well.
    The motivation for this is to accept testcases such as conv20.C and
    ttp40.C below, which don't use explicit template arguments but for
    which unnecessary template instantiation during deduction could be
    avoided if we uniformly pruned overloads according to arity early.
    This incidentally causes us to accept one reduced testcase from
    PR c++/84075, but the underlying issue there remains at large.

    As a nice side effect, this change causes the "candidate expects N
    argument(s)" note during overload resolution failure to point to the
    template candidate instead of the call site, which seems like an
    improvement along the lines of r14-309-g14e881eb030509.

    gcc/cp/ChangeLog:

            * call.cc (add_template_candidate_real): Check arity even
            when there are no explicit template arguments.  Combine the
            two adjacent '!obj' tests into one.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/vt-57397-1.C: Expect "candidate expects ... N
            argument(s)" at the declaration site instead of the call site.
            * g++.dg/cpp0x/vt-57397-2.C: Likewise.
            * g++.dg/overload/template5.C: Likewise.
            * g++.dg/template/local6.C: Likewise.
            * g++.dg/template/conv20.C: New test.
            * g++.dg/template/ttp40.C: New test.

      parent reply	other threads:[~2023-09-18 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-84075-4@http.gcc.gnu.org/bugzilla/>
2021-08-28  1:08 ` [Bug c++/84075] " pinskia at gcc dot gnu.org
2023-03-30 17:59 ` [Bug c++/84075] [10/11/12/13 Regression] " ppalka at gcc dot gnu.org
2023-07-07 10:33 ` [Bug c++/84075] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-09-18 18:41 ` cvs-commit at gcc dot gnu.org [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=bug-84075-4-hxQqevrlVW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).