On Wed, 4 Jul 2012 01:12:12 -0500, Ken Thomases said: >Right, but the elements of the enum are not of type NSComparisonResult. >In traditional C, there's no way to declare the type of elements of an >enum. There's a coming extension to the language in clang that >addresses this. <http://clang.llvm.org/docs/ >LanguageExtensions.html#objc_fixed_enum> I don't know what version of >Xcode includes or will include this. Even when it arrives in the >compiler, the SDK will have to be updated to take advantage of it.
The SDK will indeed have to change... In Objective-C++11 this is problematic because NSComparisonResult and NSInteger are now different enough that, for example, NSArray's declaration of: - (NSArray *)sortedArrayUsingFunction:(NSInteger (*)(id, id, void *))comparator context:(void *)context; is quite wrong to use NSInteger when it means NSComparisonResult. -- ____________________________________________________________ Sean McBride, B. Eng s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com