r265790 - in /trunk/gcc: cp/ChangeLog cp/cp-tre...

jason@gcc.gnu.org jason@gcc.gnu.org
Mon Nov 5 07:47:00 GMT 2018


Author: jason
Date: Mon Nov  5 07:47:05 2018
New Revision: 265790

URL: https://gcc.gnu.org/viewcvs?rev=265790&root=gcc&view=rev
Log:
	Implement UDL changes from P0732R2.

Implementing the UDL changes was pretty straightforward; I simplified
cp_parser_userdef_string_literal using the releasing_vec type from mangle.c.

While looking at this, I realized that the string UDL template taking a
character pack that we implemented for C++14 didn't actually make it into
C++14, so I've added a pedwarn for it and no longer suggest it in the
diagnostic about an invalid UDL template.

	* cp-tree.h (struct releasing_vec): Move from mangle.c.
	Add get_ref method.
	* parser.c (cp_parser_userdef_string_literal): Use it.  Handle
	passing the string to a single template parameter of class type.
	(cp_parser_template_declaration_after_parameters): Allow it.
	Pedwarn about the character pack template that was proposed but not
	accepted for C++14, and don't suggest it.

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/mangle.c
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/g++.dg/cpp0x/udlit-overflow.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58708.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr59867.C
    trunk/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-sfinae.C
    trunk/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C
    trunk/gcc/testsuite/g++.dg/cpp1y/udlit-char-template.C
    trunk/gcc/testsuite/g++.dg/cpp1y/udlit-char-template2.C



More information about the Gcc-cvs mailing list