Hey! Look at that! Under certain conditions, NSRect is just typedef to be CGRect (as it should've been all along).
Sorry for the noise. -- Rick On Mar 30, 2011, at 17:30 , Rick Mann wrote: > I have a C++ class I use to wrap CGRect: > > class > Rect : public CGRect > { > public: > Rect(); > Rect(const Rect& inRect); > Rect(const CGRect& inRect); > > Rect& operator=(const Rect& inRect); > Rect& operator=(const CGRect& inRect); > . > . > . > }; > > I wanted to extend it to allow easy initialization from NSRect as well, so I > added appropriate methods: > > #if __OBJC__ > Rect(const NSRect& inRect); > Rect& operator=(const NSRect& inRect); > #endif > > But I get a compiler error on these lines: > > Rect.h:61: error: 'Graphics::Rect::Rect(const NSRect&)' cannot be overloaded > Rect.h:59: error: with 'Graphics::Rect::Rect(const CGRect&)' > > I'm not sure why this should be the case. > > Any help is much appreciated! > > -- > Rick > > _______________________________________________ > > 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/rmann%40latencyzero.com > > This email sent to rm...@latencyzero.com _______________________________________________ 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