<div dir="ltr">This vector will never be resized. We reserve the exact size first and then use that vector.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 11, 2015 at 7:54 AM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Actually,using any set on pointers (on trunk) looks like a bug. The<br>
vector can be resized and the pointers invalidated, no?<br>
<br>
You probably need a set on the indexes.<br>
<br>
On 11 October 2015 at 10:30, Rafael EspĂ­ndola<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
> On 11 October 2015 at 10:24, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
>> Sorry about the style change. I'll separate them in future.<br>
>><br>
>> I think the use of unordered_set is reasonable because the number of<br>
>> segments are very small.<br>
><br>
> That is precisely why it is not reasonable :-)<br>
><br>
> Playing with the code a bit it seems the best thing is to just replace<br>
> it with at SmallPtrSet.<br>
><br>
> Cheers,<br>
> Rafael<br>
</div></div></blockquote></div><br></div>