fn-template15.C
355 Bytes
-
Implement P0846R0, ADL and function templates. · 5d9a0e3b
* decl.c (grokfndecl): Allow FUNCTION_DECL in assert. * lex.c (unqualified_fn_lookup_error): Handle TEMPLATE_ID_EXPR. * parser.c (cp_parser_postfix_expression): Do ADL for a template-name. (cp_parser_template_id): Give errors if parsing the template argument list didn't go well. Allow FUNCTION_DECL in assert. (cp_parser_template_name): Consider a name to refer to a template if it is an unqualified-id followed by a <. Don't return the identifier if the decl is a function and dependent. * pt.c (tsubst_copy) <case OVERLOAD>: Remove assert. * g++.dg/addr_builtin-1.C: Adjust dg-error. * g++.dg/cpp2a/fn-template1.C: New test. * g++.dg/cpp2a/fn-template10.C: New test. * g++.dg/cpp2a/fn-template11.C: New test. * g++.dg/cpp2a/fn-template12.C: New test. * g++.dg/cpp2a/fn-template13.C: New test. * g++.dg/cpp2a/fn-template14.C: New test. * g++.dg/cpp2a/fn-template15.C: New test. * g++.dg/cpp2a/fn-template16.C: New test. * g++.dg/cpp2a/fn-template2.C: New test. * g++.dg/cpp2a/fn-template3.C: New test. * g++.dg/cpp2a/fn-template4.C: New test. * g++.dg/cpp2a/fn-template5.C: New test. * g++.dg/cpp2a/fn-template6.C: New test. * g++.dg/cpp2a/fn-template7.C: New test. * g++.dg/cpp2a/fn-template8.C: New test. * g++.dg/cpp2a/fn-template9.C: New test. * g++.dg/parse/fn-template1.C: New test. * g++.dg/parse/fn-template2.C: New test. * g++.dg/parse/template19.C: Adjust dg-error. * g++.dg/template/pr61745.C: Add target to dg-error. From-SVN: r265734
Marek Polacek committed