This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement N4051 - Allow typename in a template template parameter


On 07/24/2014 11:32 AM, Jason Merrill wrote:
On 07/23/2014 10:31 PM, Ed Smith-Rowland wrote:
+    pedwarn (token->location, OPT_Wpedantic,
+ "ISO C++ forbids typename key in template template parameter");

This should mention -std=c++1z.

+  if (tag_type == none_type)
+    cp_parser_error (parser, "expected type-parameter-key");
...
+      case RT_TYPE_PARAMETER_KEY:
+        cp_parser_error (parser, "expected %<class%> or %<typename%>");

It seems unfortunate to have this diagnostic in two places. I think let's not use cp_parser_require here.

Jason


OK, here is another round..
Error handling collapsed. Got rid of RT_TYPE_PARAMETER_KEY and uses altogether.

Built and tested clean on x86_64-linux.  OK?

Ed

Attachment: CL_typename_template_template_3
Description: Text document

Attachment: patch_typename_template_template_6
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]