Menu

#11 C++ template arguments not always highlighted

SHJS
open
nobody
SHJS (12)
5
2010-08-06
2010-08-06
Yuri Khan
No

Test case:
<pre class="sh_cpp"><code><![CDATA[pair<iterator, bool> p;]]></code></pre>

Expected:
"bool" highlighted with class="sh_type"
"iterator" possibly highlighted with class="sh_usertype"
"pair<iterator, bool>" highlighted with class="sh_usertype"

Observed:
"pair<iterator, bool>" highlighted with class="sh_usertype", and that's all

On the other hand:
<pre class="sh_cpp"><code><![CDATA[class foo : public pair<iterator, bool> {}]]></code></pre>

Here "pair<iterator, bool>" is not highlighted as class="sh_usertype" and "bool" is highlighted as sh_type, as expected.

Discussion


Log in to post a comment.