PR c++/79316 - default argument in deduction guide
authorJason Merrill <jason@redhat.com>
Thu, 9 Feb 2017 20:55:54 +0000 (15:55 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 9 Feb 2017 20:55:54 +0000 (15:55 -0500)
commita56c0ac08242269bbcc4bd1f480eda2378336776
treefdb30ba42b1dd45219d4eab973e41db807ec03b7
parent388dde26a5b5a6740018340953955eb05abba817
PR c++/79316 - default argument in deduction guide

PR c++/79350 - explicit deduction guide
* parser.c (cp_parser_constructor_declarator_p)
(cp_parser_direct_declarator): Parse deduction guides more like
constructors.
* cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
* tree.c (special_function_p): Return it.
* decl.c (check_special_function_return_type): Handle it.
(grokdeclarator, grokfndecl): Adjust.
(cp_finish_decl): Pass flags to do_auto_deduction.
* error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
* pt.c (dguide_name_p): Take a const_tree.
(do_class_deduction): Handle explicit.
(do_auto_deduction): Pass flags through.
(build_deduction_guide): Copy explicit flag.

From-SVN: r245314
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/cpp1z/class-deduction27.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/class-deduction28.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/class-deduction9.C