<div dir="ltr">Totally plausible. Optional/debatable comments:<br><br>1) is it worth supporting the more idiomatic clear+shrink_to_fit to be clear of the semantics? ('reset' seems vague) It looks like it's sort of halfway there already, with shrink_and_clear. Could just be generalized a bit more to be part of the solution to this use case<br>2) I would perhaps consider testing via looking at the address of an element added after calling reset, rather than using isSmall, but I realize that's totally subjective (& reactive - perhaps if I wrote it, I would've written it as you have)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 4:43 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">0001 adds `SmallPtrSet::reset()`, which returns `SmallPtrSet` to small<br>
mode after completely freeing its heap memory.  To facilitate testing,<br>
I changed `isSmall()` to a public accessor.<br>
<br>
Thoughts?<br>
<br>
(0002 is the reason I was looking at this.)<br>
<br>
<br>
</blockquote></div><br></div>