On 3/20/20 7:02 PM, Marek Polacek wrote:
On Fri, Mar 20, 2020 at 02:12:49PM -0400, Jason Merrill wrote:
On 3/20/20 1:06 PM, Marek Polacek wrote:
Wonderful.  I've added a bunch of tests, and some from the related DRs too.
But I had a problem with the class-or-decltype case: if we have

template<typename T> struct D : T::template B<int>::template C<int> {};

then we still require all the 'template' keywords here (as does clang).  So I'm
kind of confused, but I don't think it's a big deal right now.

This seems related enough that I'd like to fix it at the same time; why
doesn't your patch fix it?  Is it because typename_p is false?

Ah, I was mistaken.  Of course we need the template keyword here: it's a member 
of an
unknown specialization!

That's why it's needed in contexts where we don't know whether or not we're naming a type. But where we do know that, as in a base-specifier, it isn't necessary. This is exactly DR 1710: "The keyword template is optional in a ... class-or-decltype (Clause 11.7 [class.derived])...."

Jason

Reply via email to