Ahh, I didn't do this because I imagined cases where you might want ValueType to be something you can't change like ArrayRef, or have 2 different VarStreamArrays both with the same ValueType but using a different algorithm to extract them.  Currently we don't but I thought we might need it later <br><div class="gmail_quote"><div dir="ltr">On Fri, May 27, 2016 at 8:14 AM Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added a comment.<br>
<br>
I mean it seems you can define `static uint32_t extract(const StreamInterface &Stream, CVRecord &Item)` for CVRecord class and template VarStreamArray with CVRecord (instead of the traits class).<br>
<br>
So you are currently doing this.<br>
<br>
  VarStreamArrayIterator(const VarStreamArray<TraitsType> &Array)<br>
      : Array(&Array), IterRef(Array.Stream) {<br>
    ThisLen = TraitsType::extract(IterRef, ThisValue);<br>
  }<br>
<br>
But looks like it can be written like this if you remove the template class and directly use CVRecord class.<br>
<br>
  VarStreamArrayIterator(const VarStreamArray<T> &Array)<br>
      : Array(&Array), IterRef(Array.Stream) {<br>
    ThisLen = T::extract(IterRef, ThisValue);<br>
  }<br>
<br>
no?<br>
<br>
<br>
<a href="http://reviews.llvm.org/D20724" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20724</a><br>
<br>
<br>
<br>
</blockquote></div>