This patch implements C++20 class template argument deduction for alias templates, which works by a moderately arcane transformation of the deduction guides for the underlying class template. When implementing it, it seemed that I could simplify the rules in the draft a bit and get essentially the same effect; I'll be emailing the committee to that effect soon. gcc/cp/ * pt.c (rewrite_tparm_list): Factor out of build_deduction_guide. (maybe_aggr_guide): Check for copy-init here. (alias_ctad_tweaks, deduction_guides_for): New. (ctor_deduction_guides_for): Factor out of do_class_deduction. (ctad_template_p): New. * parser.c (cp_parser_simple_type_specifier): Use it. * constraint.cc (append_constraint): New. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides. From-SVN: r278786
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
ChangeLog.gimple-classes | Loading commit data... | |
c-ada-spec.c | Loading commit data... | |
c-ada-spec.h | Loading commit data... | |
c-attribs.c | Loading commit data... | |
c-common.c | Loading commit data... | |
c-common.def | Loading commit data... | |
c-common.h | Loading commit data... | |
c-cppbuiltin.c | Loading commit data... | |
c-dump.c | Loading commit data... | |
c-format.c | Loading commit data... | |
c-format.h | Loading commit data... | |
c-gimplify.c | Loading commit data... | |
c-indentation.c | Loading commit data... | |
c-indentation.h | Loading commit data... | |
c-lex.c | Loading commit data... | |
c-objc.h | Loading commit data... | |
c-omp.c | Loading commit data... | |
c-opts.c | Loading commit data... | |
c-pch.c | Loading commit data... | |
c-ppoutput.c | Loading commit data... | |
c-pragma.c | Loading commit data... | |
c-pragma.h | Loading commit data... | |
c-pretty-print.c | Loading commit data... | |
c-pretty-print.h | Loading commit data... | |
c-semantics.c | Loading commit data... | |
c-spellcheck.cc | Loading commit data... | |
c-spellcheck.h | Loading commit data... | |
c-target-def.h | Loading commit data... | |
c-target.def | Loading commit data... | |
c-target.h | Loading commit data... | |
c-ubsan.c | Loading commit data... | |
c-ubsan.h | Loading commit data... | |
c-warn.c | Loading commit data... | |
c.opt | Loading commit data... | |
cppspec.c | Loading commit data... | |
known-headers.cc | Loading commit data... | |
known-headers.h | Loading commit data... | |
name-hint.h | Loading commit data... | |
stub-objc.c | Loading commit data... |