<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Sep 3, 2013, at 11:58 AM, Matthias Braun <<a href="mailto:mbraun@apple.com">mbraun@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">On Sep 3, 2013, at 11:52 AM, Benjamin Kramer <<a href="mailto:benny.kra@gmail.com">benny.kra@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On 03.09.2013, at 20:46, Matthias Braun <<a href="mailto:mbraun@apple.com">mbraun@apple.com</a>> wrote:<br><br><blockquote type="cite">Currently I see these options:<br><br>1:<br>live with a freestanding struct LiveInterval;<br><br>2:<br>class LiveIntervalBase {<br>public: struct Segment {};<br>};<br>template <> struct isPodLike<LiveIntervalBase::Segment> /* … */<br>class LiveInterval : public LiveIntervalBase {<br>public:<br>  SmallVector<Segment> /* … */<br>};<br><br>3:<br>/** please do not use directly but LiveInterval::Segment */<br>struct LiveSegment { /* … */ }<br>template <> struct isPodLike<LiveSegment> /* … */<br>class LiveInterval {<br>public:<br> typedef LiveSegment Segment;<br> SmallVector<Segment> /* … */<br>};<br><br>4: Drop the isPodLike, no idea if/how badly it affects performance<br></blockquote><br>When compiling with Clang we use the is_trivially_copyable type trait as a base line for isPodLike. That should be sufficient for the Segment class. Not sure if we care enough about performance on other compilers.<br></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Indeed, sounds like a good enough reason to drop isPodLike here, IMHO.</div></blockquote><div><br></div><div>+1 Go for it.</div><div><br></div><div>Clang’s release build ought to be self hosting anyway, so there is no reason to worry about performance on other compilers.</div><div><br></div><div>Thanks,</div><div>/jakob</div><div><br></div></div></body></html>