<div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 21, 2012 at 6:59 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank" class="cremed">rtrieu@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently, template diffing does not handle cases where the templates have qualifiers.  This can lead to warnings such as:<div>
<br></div><div>... 'vector<vector<[...]>>' cannot convert to 'vector<vector<[...]>>' ...</div>

<div><br></div><div>when the message means, can't convert from vector<const vector<int>> to vector<vector<int>>.  This patch allows the internal diff tree to store the qualifiers for template types and adds new methods for finding the difference between sets of qualifiers and to print out the qualifiers.  This does not affect non-template types as they already print qualifiers.</div>
</blockquote><div><br></div><div>Very cool!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Examples:<br></div><div>vector<const vector<int>> and vector<vector<int>></div><div>inline: vector<const vector<[...]>> vs. vector<(missing const) vector<[...]></div></blockquote>
<div><br></div><div>I think I would prefer: vector<const vector<[...]>> vs. vector<vector<[...]>></div><div><br></div><div>We can use the cyan highlighting to further emphasize the qualifiers on both sides (if any) when the qualifiers are different. This would make the const bright here, and in the example further down, the const bright on one side and the volatile on the other.</div>
<div><br></div><div>One reason why I prefer this format is brevity. The other is that the error might be the *presence* of const just as easily as the absence.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>tree:</div><div>vector<</div><div>  [const != (no qualifiers)] vector<</div></blockquote><div><br></div><div>But I like this to show no qualifiers in the != display of the tree.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>    [...]>></div><div><br></div><div>vector<const vector<int>> and vector<volatile vector<int>></div>

<div>inline: vector<const (missing volatile) vector<[...]>> vs vector<volatile (missing const) vector<[...]>></div><div>tree:</div><div>vector<</div><div>  [const != volatile] vector<</div><div>


    [...]>></div><div><br></div><div>Highlighting is also added for the differing qualifiers.</div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" class="cremed">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>