> Ah, right, we parse it in the cp_parser_template_id call in > cp_parser_simple_type_specifier. So we'd need to enter template scope as > soon as cp_parser_template_name in cp_parser_template_id finds a > concept-name. And from there it's not clear where we could put a matching > --ptd. I guess we need to split the creation of > parser->implicit_template_scope out of synthesize_implicit_template_parm so > we can create that scope before we are ready to actually add a parm to it. > > Jason >
Thanks for the suggestion Jason! I'm not certain how I'd go about splitting parser->implicit_template_scope out of synthesize_implicit_template_parm in this case to allow for identifying early that a concept should be in template scope before we look at its parameters, seems like it would involve some more structural changes in the way template arguments are parsed for concepts, and the scope management seems tricky. I'm happy to test any patches or continue investigating if you have specific ideas, but these changes might be beyond what i can implement with my knowledge of the parser architecture.
