On 24.08.2013, at 23:01, Jean-Daniel Dupas <devli...@shadowlab.org> wrote:
> > Le 24 août 2013 à 22:09, Andreas Grosam <agro...@onlinehome.de> a écrit : > > > That's not a problem specifics to NSValue. I disagree. Please read the documentation of NSValue: valueWithBytes:objCType: Creates and returns an NSValue object that contains a given value, which is interpreted as being of a given Objective-C type. isEqualToValue: Returns a Boolean value that indicates whether the receiver and another value are equal. The fact is, the result of isEqualToValue: is more often undefined, implementation defined or completely random when applied to structs. > You should know what you do when manipulating structs. I think, I do - otherwise, I wouldn't come up with this problem. The problem is, that in some library which we cannot mention here, two encoded structs wrapped into NSValues together with method isEqualToValue: will be used as a means to compare structs. IMO, this's not a reliable approach. Andreas _______________________________________________ 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