<div dir="ltr">I think I remember now why this wouldn't work - because we wouldn't get any template type argument deduction if we used ArrayRef. That's unfortunate... <br><br>If you just want to support the case where the sequence is written in the call, you could use an initializer_list argument maybe? (not sure how that interacts with templates) or a variadic template<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 9:45 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Shooting from the cuff, would it work better to support ArrayRef here (which can be implicitly constructed from an array) - that way it'll support initializer_list as well (so you can just write "LE.write({0x1234, 0x5678})" I think?) & other cases (all the other ArrayRefable things like SmallVector, std::vector, etc)<br><br>Also, would it make sense to implement the array version in terms of the non-array version, rather than doing the byte swapping explicitly here? </div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Jan 22, 2016 at 9:32 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">First, thanks for EndianStream. I am using it in an experiment in lld<br>
and it is awesome :-)<br>
<br>
It is just missing support for arrays, which the attached patch adds.<br>
Let me know what you think.<br>
<br>
Cheers,<br>
Rafael<br>
<br></div></div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div>