From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 159D63858028; Thu, 9 Mar 2023 15:27:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 159D63858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678375669; bh=cf7fp7SLBSayVxErcB/mkOjL4YnurwclI1JY58kEm7Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hyy7Nju9xbPCkYl1/mTYh+LzR1CUPnk60ZsAai81gHU+/aVqBN+H/+ESoshFjrG9x U/C6b00MqXMdQ3CuAFwnBq4o1mxp6DOV04Gu4IG2rlqbGhRAJG3qJICxnfPrXS7F13 rWnd627JGLC5iuxh8rEyDT/baf/bnE7VFDJnKbiI= From: "cvs-commit at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105841 --- Comment #10 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:148cbb153dafd6b21d83c00787acd430aec68a3d commit r13-6553-g148cbb153dafd6b21d83c00787acd430aec68a3d Author: Jason Merrill 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 underlyi= ng 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.=