On 10/12/2011 01:05 AM, Ed Smith-Rowland wrote:
cp_parser_operator(function_id) is simply run twice in cp_parser_unqualified_id. Once inside cp_parser_template_id called at parser.c:4515. Once directly inside cp_parser_unqualified_id at parser.c:4525.
Ah. You could try replacing the operator "" X tokens with a single CPP_LITERAL_OPERATOR token, like we do for CPP_NESTED_NAME_SPECIFIER and CPP_TEMPLATE_ID.
cp_parser_template_id never succeeds with literal operator templates. I find that curious. But I haven't looked real hard and the things do get parsed somehow.
I'd only expect it to succeed if you actually wrote, e.g., operator""_c<'a','b','c'>(); Jason