]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/cxx-pretty-print.c
Fix constrained alias template transparency.
authorJason Merrill <jason@redhat.com>
Wed, 27 Nov 2019 22:05:47 +0000 (17:05 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 27 Nov 2019 22:05:47 +0000 (17:05 -0500)
commit1f41df916c2d6d7598cb5e67cdaebdc86910e902
tree50c06c4b53bf6fd71ab1e834aabdcf0a2c7e4b37
parent96cbfa7ff8a146febd6af9a53d10468a90706419
Fix constrained alias template transparency.

A constrained alias template can't be treated as equivalent to its
underlying template/type for much the same reason that an alias template
like void_t can't; we're relying on checking during substitution.

* cxx-pretty-print.c (pp_cxx_unqualified_id): Handle alias
template-id.
* pt.c (complex_alias_template_p): True if constraints.
(get_underlying_template, tsubst): Check alias constraints.
(push_template_decl_real): Set alias constraints here.
* parser.c (cp_parser_alias_declaration): Not here.
* constraint.cc (get_constraints): Take const_tree.

From-SVN: r278785
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/concepts-alias.C
gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C [new file with mode: 0644]