Closed
Description
In Cpp2 my intent is to make this a non-problem (famous last words!) by addressing this in two chunks:
- Cpp2 has no comma operator, so that removes the possibility of
b,c
being a comma-expression.- Cpp2 requires a relational comparison expression in a template-argument-list to be parenthesized. (*)
In C++, b,c
in a template-argument-list cannot be a comma-expression because the grammar sets the template-argument production to conditional-expression, which is higher precedence than expression, which is where the comma is parsed. The notes concerning comma-expression are irrelevant.
More generally, I don't see how context insensitivity is achieved. What is changed, other than requiring parens around comparisons in the template-argument-list?
f(temp_or_object<a, b>(c));
Is this disallowed Cpp2 syntax? It's definitely ambiguous.