<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 7:53 PM, Rui Ueyama via llvm-commits <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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added inline comments.<br>
<span class=""><br>
================<br>
Comment at: include/llvm/DebugInfo/CodeView/StreamArray.h:114-115<br>
@@ -113,4 +113,2 @@<br>
</span><span class="">   friend class FixedStreamArrayIterator<T>;<br>
-  static_assert(std::is_trivially_constructible<T>::value,<br>
-                "FixedStreamArray must be used with trivial types");<br>
<br>
</span>----------------<br>
<span class="">majnemer wrote:<br>
> You could go with `std::is_standard_layout<T>::value && std::is_trivial<T>::value` to get more or less the same thing.<br>
</span>This seems a bit too tricky to me. It would just fail if you pass non-trivially-constructible class to this one, so I'm okay without this assertion.<br></blockquote><div><br></div><div>what/how would it fail? Testing for is_trivially_constructible to me would indicate that this code is using memory that's perhaps zero'd out without invoking the ctor for the type. If the type isn't trivially constructible that sort of thing's going to result in subtle behavior, quite often not an outright failure.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D20719" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20719</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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>
</div></div></blockquote></div><br></div></div>