<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;">On Oct 1, 2014, at 4:34 PM, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com">kyrtzidis@apple.com</a>> wrote:<br><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">+ John</div><div class=""><br class=""></div><div class="">John, could you advice here ?</div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 1, 2014, at 4:20 PM, Marshall Clow <<a href="mailto:mclow.lists@gmail.com" class="">mclow.lists@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=windows-1252" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Oct 1, 2014, at 3:36 PM, Marshall Clow <<a href="mailto:mclow.lists@gmail.com" class="">mclow.lists@gmail.com</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><div style="font-family: LucidaGrande; font-size: 11px; 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;" class=""><br class=""></div><div style="font-family: LucidaGrande; font-size: 11px; 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;" class="">Richard Smith pointed out that destroying a pointer to an objective-C class might require an ARC call, and so the compiler needs to see the type to figure out if it is_destructible.</div><div style="font-family: LucidaGrande; font-size: 11px; 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;" class=""><br class=""></div><div style="font-family: LucidaGrande; font-size: 11px; 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;" class="">Note that is_destructible<ObjCForwardClass**>::value is true, so it’s just pointers to objective-C objects, not pointers in general.</div></blockquote><br class=""></div><div class="">Richard also pointed me to: <a href="http://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers" class="">http://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers</a></div><div class=""><br class=""></div><div class="">So, while I agree with <font face="LucidaGrande" class="">Argyrios that this changed the behavior of is_trivially_destructible for forward-declared objective-C classes,</font></div><div class=""><font face="LucidaGrande" class="">I am now convinced that the old behavior was incorrect, and the new behavior is “better”.</font></div><div class=""><font face="LucidaGrande" class=""><br class=""></font></div><div class=""><font face="LucidaGrande" class="">One could argue that a forward-declared objective-C class is not a complete type, since the compiler doesn’t know how to destroy it, and if so, then is_destructible is not required to give any answer at all ("T shall be a complete type”).</font></div></div></div></blockquote></div></div></blockquote><div><br></div>Pointers to forward-declared Objective-C classes are still complete types.  They should be both destructible and (outside of ARC) non-trivially destructible.</div><div><br></div><div>I assume the problem here is ObjC property syntax, which usually looks like “foo.prop” where foo has ObjC pointer type.  Type-checking a property access really does require the type to be complete.  However, pseudo-destructor calls are not property accesses, and should not require the pointee type to be complete.</div><div><br></div><div>Does that answer your question?</div><div><br></div><div>John.</div></body></html>