On Mon, Apr 9, 2018 at 6:55 PM, Paolo Carlini <paolo.carl...@oracle.com> wrote:
> On 09/04/2018 21:39, Jason Merrill wrote:
>>
>> cp_parser_check_template_parameters is supposed to catch when we have
>> the wrong number of template parameter lists, but it wasn't diagnosing
>> this case.  Fixed by checking whether the thing we're declaring used a
>> template-id; the case of declaring a primary template, when we allow
>> one more template parameter list, uses a plain identifier.
>
> Nice, it looks like this also fixes the prehistoric c++/24314, which I still
> had assigned.

Great!

> When I worked a bit on it, relatively recently, in 2012, I
> failed to properly follow-up to your feedback on the mailing list, but I
> don't think we really nailed the problem, did we?
>
>     https://gcc.gnu.org/ml/gcc-patches/2012-09/msg00504.html
>
> Or maybe we just tried to do too much, like doing away completely with
> cp_parser_check_template_parameters in favor of a bit of additional checking
> in maybe_process_partial_specialization.

I'm sure late checking like we discussed there can also work, but this
ended up being a simple way to make the current code work better...

Jason

Reply via email to