On Oct 1, 2014, at 3:36 PM, Marshall Clow <[email protected]> wrote:
> 
> 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.
> 
> Note that is_destructible<ObjCForwardClass**>::value is true, so it’s just 
> pointers to objective-C objects, not pointers in general.

Richard also pointed me to: 
http://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers

So, while I agree with Argyrios that this changed the behavior of 
is_trivially_destructible for forward-declared objective-C classes,
I am now convinced that the old behavior was incorrect, and the new behavior is 
“better”.

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”).

— Marshall


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to