Re: Stupid block syntax!
Re: Stupid block syntax!
- Subject: Re: Stupid block syntax!
- From: Sean McBride <email@hidden>
- Date: Wed, 04 Jul 2012 16:45:59 -0400
- Organization: Rogue Research Inc.
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 email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden