On Thu, May 6, 2010 at 4:38 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Thu, May 6, 2010 at 4:18 PM, Barry Wark <barryw...@gmail.com> wrote: >> Thank you all for the suggestions. Using manual dynamic memory >> allocation somewhat defeats the purpose of using smart pointers, but >> it looks like that's the only option for now. For reference, I've >> filed this as rdar://7953539, but would be happy to be shown the error >> of my ways. > > It looks like there's just bad news all around with incomplete types > and synthesized instance variables. I found clang crashes when told to > synthesize an instance variable of incomplete type. I wouldn't be > surprised if the interactions between ivar synthesis and the type > system were not completely nailed down. > > For reference, the clang bug is http://llvm.org/bugs/show_bug.cgi?id=7064
Kyle, Your comment brings things into better focus; it appears that template instantiation is happening after the compiler attempts to synthesize the ivar and accessor methods. Again, my C++-foo is weak but I recall that template instantiation happens as a separate compilation step, no? Too bad; it's a shame to have to resort to allocating a shared_ptr on the heap just to play nicely with modern C++ code that's using RAII (including smart pointers) to manage memory. -Barry > > --Kyle Sluder > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com