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++/105841] [12/13 Regression] Change in behavior of CTAD for alias templates
Date: Thu, 09 Mar 2023 15:27:47 +0000	[thread overview]
Message-ID: <bug-105841-4-7P4MVtqVLP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105841-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:148cbb153dafd6b21d83c00787acd430aec68a3d

commit r13-6553-g148cbb153dafd6b21d83c00787acd430aec68a3d
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Feb 9 12:51:51 2023 -0800

    c++: add __is_deducible trait [PR105841]

    C++20 class template argument deduction for an alias template involves
    adding a constraint that the template arguments for the alias template can
    be deduced from the return type of the deduction guide for the underlying
    class template.  In the standard, this is modeled as defining a class
    template with a partial specialization, but it's much more efficient to
    implement with a trait that directly tries to perform the deduction.

    The first argument to the trait is a template rather than a type, so
various
    places needed to be adjusted to accommodate that.

            PR c++/105841

    gcc/ChangeLog:

            * doc/extend.texi (Type Traits):: Document __is_deducible.

    gcc/cp/ChangeLog:

            * cp-trait.def (IS_DEDUCIBLE): New.
            * cxx-pretty-print.cc (pp_cxx_trait): Handle non-type.
            * parser.cc (cp_parser_trait): Likewise.
            * tree.cc (cp_tree_equal): Likewise.
            * pt.cc (tsubst_copy_and_build): Likewise.
            (type_targs_deducible_from): New.
            (alias_ctad_tweaks): Use it.
            * semantics.cc (trait_expr_value): Handle CPTK_IS_DEDUCIBLE.
            (finish_trait_expr): Likewise.
            * constraint.cc (diagnose_trait_expr): Likewise.
            * cp-tree.h (type_targs_deducible_from): Declare.

    gcc/testsuite/ChangeLog:

            * g++.dg/ext/is_deducible1.C: New test.

  parent reply	other threads:[~2023-03-09 15:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 18:12 [Bug c++/105841] New: " avemilia at protonmail dot com
2022-06-06 12:50 ` [Bug c++/105841] [12/13 Regression] " ppalka at gcc dot gnu.org
2022-06-06 19:28 ` jason at gcc dot gnu.org
2022-06-06 20:12 ` jason at gcc dot gnu.org
2022-06-07  0:02 ` mike at spertus dot com
2022-06-07  4:05 ` jason at gcc dot gnu.org
2022-06-09 13:39 ` ppalka at gcc dot gnu.org
2022-07-25 16:11 ` rguenth at gcc dot gnu.org
2023-02-09 22:05 ` jason at gcc dot gnu.org
2023-02-09 23:07 ` jason at gcc dot gnu.org
2023-02-09 23:26 ` mike at spertus dot com
2023-02-10 16:29 ` mike at spertus dot com
2023-03-09 15:27 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-09 15:27 ` cvs-commit at gcc dot gnu.org
2023-03-09 15:30 ` [Bug c++/105841] [12 " jason at gcc dot gnu.org
2023-05-08 12:24 ` rguenth at gcc dot gnu.org
2023-12-20 22:23 ` jason at gcc dot gnu.org
2024-04-17 12:22 ` hokein.wu at gmail dot com
2024-04-24 21:41 ` ppalka at gcc dot gnu.org
2024-04-25 10:31 ` hokein.wu at gmail dot com

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-105841-4-7P4MVtqVLP@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).