Subject: bug#7917: [PATCH] cc-mode: not all templates are types

From: Daniel Colascione <[email-masked]>
Date: Thu, 25 Feb 2016 22:30:06 -0800

On 02/25/2016 10:22 PM, Lars Ingebrigtsen wrote:
> Daniel Colascione <[email-masked]> writes:
> 
>> None of the templates here should be fontified as types.
>>
>> template<typename T>
>> void foo(T t)
>> {}
>>
>> template<>
>> void foo<int>(int x)
>> {}
>>
>> void bar()
>> {
>>     foo<int>(5);
>> }
> 
> On the Emacs trunk, I can't see anything immediately wrong about the
> fontification of the templates -- they're all fontified with the keyword
> face.
> 
> So has this been fixed in the meantime (just five years)?
> 

For me --- empty scratch buffer, c++-mode, emacs -Q, pasting in
this example, the name of the second function is fontified as a type,
not a function name. In the third function, in the call to foo<int>, foo
is also fontified as a type, although it shouldn't be fontified as
anything at all.