<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 14, 2015 at 1:25 PM, 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><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> One solution would be to define:<br>
><br>
> template <endianness endian><br>
> inline uint32_t read32(const void *p) { return *(const detail::packed_endian_specific_integral<uint32_t, endian, unaligned> *) p; }<br>
><br>
> and similar for write32, and implement Endian-independent things in terms of those.<br>
<br>
</span>LGTM :-)</blockquote><div><br></div><div>It doesn't look good to me. It looks more intricate than necessary. I really prefer the current code over the suggested one.</div></div></div></div>